[Bug lto/56168] New: [4.8 Regression] GCC seems to disregard -fno-builtin when compiling with LTO

d.g.gorbachev at gmail dot com gcc-bugzilla@gcc.gnu.org
Fri Feb 1 02:44:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56168

             Bug #: 56168
           Summary: [4.8 Regression] GCC seems to disregard -fno-builtin
                    when compiling with LTO
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: d.g.gorbachev@gmail.com


cat > 1.c
extern int printf(const char *, ...);
extern double pow(double, double);

int main(int argc, char **argv)
{
  double d1 = (double) (argc + argv[0][0]);
  double d2 = pow(d1, 1.0 / 3.0);
  printf("%f %f\n", d1 * d1, d2);
  return 0;
}
^D
$ gcc -O -fno-builtin -ffast-math -fno-lto 1.c
/tmp/cc9Il6Md.o:1.c:function main: error: undefined reference to 'pow'
[...]
$ gcc -O -fno-builtin -ffast-math -flto 1.c
/tmp/ccfKmD30.ltrans0.ltrans.o:ccfKmD30.ltrans0.o:function main: error:
undefined reference to 'cbrt'
[...]

R191367 (20120916) - ok, r191654 (20120923) - bug.



More information about the Gcc-bugs mailing list