f2c-compiled program produces no output

Bug #1976406 reported by Thomas Kenig
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
f2c (Ubuntu)
New
Undecided
Unassigned

Bug Description

$ cat hello.f
      print *,"Hello, world"
      end
$ f2c hello.f
hello.f:
   MAIN:
$ cat hello.c
/* hello.f -- translated by f2c (version 20160102).
   You must link the resulting object file with libf2c:
        on Microsoft Windows system, link with libf2c.lib;
        on Linux or Unix systems, link with .../path/to/libf2c.a -lm
        or, if you install libf2c.a in a standard place, with -lf2c -lm
        -- in that order, at the end of the command line, as in
                cc *.o -lf2c -lm
        Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,

                http://www.netlib.org/f2c/libf2c.zip
*/

#include "f2c.h"

/* Table of constant values */

static integer c__9 = 9;
static integer c__1 = 1;

/* Main program */ int MAIN__(void)
{
    /* Builtin functions */
    integer s_wsle(cilist *), do_lio(integer *, integer *, char *, ftnlen),
            e_wsle(void);

    /* Fortran I/O blocks */
    static cilist io___1 = { 0, 6, 0, 0, 0 };

    s_wsle(&io___1);
    do_lio(&c__9, &c__1, "Hello, world", (ftnlen)12);
    e_wsle();
    return 0;
} /* MAIN__ */

$ gcc hello.c -lf2c
$ ./a.out
$

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: f2c 20160102-1
ProcVersionSignature: Ubuntu 5.4.0-113.127-generic 5.4.181
Uname: Linux 5.4.0-113-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.20.11-0ubuntu27.24
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: KDE
Date: Tue May 31 22:15:02 2022
InstallationDate: Installed on 2021-03-27 (430 days ago)
InstallationMedia: Ubuntu-Server 20.04.2 LTS "Focal Fossa" - Release amd64 (20210201.2)
SourcePackage: f2c
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Thomas Kenig (tkoenig2) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.