This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/54012] printf crash with -lgfortran
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Oct 2012 22:04:33 +0000
- Subject: [Bug libfortran/54012] printf crash with -lgfortran
- Auto-submitted: auto-generated
- References: <bug-54012-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54012
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #10 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-10-30 22:04:33 UTC ---
(In reply to comment #9)
> "ldd bad":
> linux-vdso.so.1 => (0x00007fffd97ff000)
> libquadmath.so.0 => /usr/lib64/libquadmath.so.0 (0x00007f74e80ec000)
Could you try linking libquadmath directly instead of libgfortran (which
implies libquadmath)?
The reason is that libquadmath installs, if possible, GLIBC's printf hooks, cf.
http://gcc.gnu.org/onlinedocs/libquadmath/quadmath_005fsnprintf.html
and the source code at
http://gcc.gnu.org/viewcvs/trunk/libquadmath/printf/quadmath-printf.c?view=markup
With those hooks, "printf("%Qe\n", float128_number)" will work. In principle,
it shouldn't cause those issues, but depending on the GLIBC version it might.
(If libquadmath is the cause, it also explains that it works with -static as
libgfortran only statically links libquadmath if needed.)