f90-intrinsic-bit.f (from the gfortran test suite) fails with at any optimization level different that -O0. This is due to the flag -fmerge-constants. The reduced test case is the following:
integer*1 k k = 0 print *, ISHFT(k,-BIT_SIZE(k)) end At compilation, it produces: $ gfortran -fmerge-constants reduced.f /usr/bin/ld: /var/tmp//cceQRkH8.o 8 byte literal section (__TEXT,__literal8) size is not a multiple of 8 bytes The assembler output with and without differ only by one line. With the flag on (wrong assembler), it is: LC0: .ascii "reduced.f\0" .literal8 while the "correct" assembler (without -fmerge-constants) is: LC0: .ascii "reduced.f\0" .const I hope this will be enough for you to identify the source of this bug, which is currently the only test case failure specific to powerpc-darwin... -- Summary: f90-intrinsic-bit.f produces wrong code with -fmerge- constants on powerpc-apple-darwin7.7.0 Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: coudert at clipper dot ens dot fr CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: powerpc-apple-darwin7.7.0 GCC host triplet: powerpc-apple-darwin7.7.0 GCC target triplet: powerpc-apple-darwin7.7.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19335