This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33271] nint_2.f90 abort compiled with -O0
- From: "dje at watson dot ibm dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Sep 2007 17:19:07 -0000
- Subject: [Bug fortran/33271] nint_2.f90 abort compiled with -O0
- References: <bug-33271-14842@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from dje at watson dot ibm dot com 2007-09-05 17:19 -------
Subject: Re: nint_2.f90 abort compiled with -O0
>>>>> fxcoudert at gcc dot gnu dot org writes:
FX> David, could you test my C program in comment #4
$ ./xgcc -B./ -W -Wall -O1 fx.c
fx.c: In function 'main':
fx.c:46: warning: integer constant is too large for 'long' type
fx.c:47: warning: integer constant is too large for 'long' type
fx.c:51: warning: integer constant is too large for 'long' type
fx.c:52: warning: integer constant is too large for 'long' type
$ ./a.out
4 4 8
$ ./xgcc -B./ -W -Wall -O0 fx.c
fx.c: In function 'main':
fx.c:46: warning: integer constant is too large for 'long' type
fx.c:47: warning: integer constant is too large for 'long' type
fx.c:51: warning: integer constant is too large for 'long' type
fx.c:52: warning: integer constant is too large for 'long' type
ld: 0711-317 ERROR: Undefined symbol: .lround
ld: 0711-317 ERROR: Undefined symbol: .lroundf
ld: 0711-317 ERROR: Undefined symbol: .llround
$ ./xgcc -B./ -W -Wall -O0 fx.c -lm
fx.c: In function 'main':
fx.c:46: warning: integer constant is too large for 'long' type
fx.c:47: warning: integer constant is too large for 'long' type
fx.c:51: warning: integer constant is too large for 'long' type
fx.c:52: warning: integer constant is too large for 'long' type
$ ./a.out
4 4 8
Abort 1
$ ./xgcc -B./ -maix64 -W -Wall -O1 fx.c
$ ./a.out
4 8 8
$ ./xgcc -B./ -maix64 -W -Wall -O0 fx.c -lm
$ ./a.out
4 8 8
Abort 1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33271