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: "astroseger at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 30 Oct 2012 22:37:40 +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
--- Comment #11 from Sergey Rodionov <astroseger at gmail dot com> 2012-10-30 22:37:40 UTC ---
(In reply to comment #10)
> (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.)
Yes. you are right. The real problem is libquadmath. If I compile with
-lquadmath it crash...
But interesting that quadmath_snprintf by itself works...