http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54012
Bug #: 54012 Summary: printf crush with -lgfortran Classification: Unclassified Product: gcc Version: 4.6.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: astrose...@gmail.com It could be a bug of Magia distributive, not the gcc, but just in case. The following code results in a segmentation fault if compile with -lgfortran! %%%%%%%%%%%%%%%%% #include <stdio.h> int main () { printf( "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" "%% %% %% %% %% %% %% %% %% %%\n" ); } %%%%%%%%%%%%%%%%%% gcc test.c -lgfortran (without -lgfortran would work fine) Distributive: Mageia release 2 (Official) for x86_64 gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-mageia-linux-gnu/4.6.3/lto-wrapper Target: x86_64-mageia-linux-gnu Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib --with-slibdir=/lib64 --with-bugurl=http://bugs.mageia.org/ --mandir=/usr/share/man --infodir=/usr/share/info --enable-checking=release --enable-languages=c,c++,ada,fortran,objc,obj-c++,java --enable-linker-build-id --build=x86_64-mageia-linux-gnu --host=x86_64-mageia-linux-gnu --with-cpu=generic --with-system-zlib --enable-threads=posix --enable-shared --enable-objc-gc --enable-long-long --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --enable-java-awt=gtk --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-gtk-cairo --disable-libjava-multilib --enable-ssp --disable-libssp --disable-werror --with-ppl --with-cloog --with-python-dir=/lib/python2.7/site-packages --enable-lto Thread model: posix gcc version 4.6.3 (GCC)