From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3863 invoked by alias); 30 Oct 2012 22:04:53 -0000 Received: (qmail 3409 invoked by uid 48); 30 Oct 2012 22:04:34 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libfortran/54012] printf crash with -lgfortran Date: Tue, 30 Oct 2012 22:04:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libfortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg02905.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54012 Tobias Burnus changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #10 from Tobias Burnus 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.)