public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53213] New: Internal compiler error in math.h
@ 2012-05-03 13:48 lbl2007 at gmx dot net
2012-05-03 14:19 ` [Bug c++/53213] " paolo.carlini at oracle dot com
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: lbl2007 at gmx dot net @ 2012-05-03 13:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53213
Bug #: 53213
Summary: Internal compiler error in math.h
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: lbl2007@gmx.net
Using C math functions in C++ triggers an ICE. See below for a simple example.
The problem actually occured when using math.h, the program below is a
stripped-down version of the preprocessed source.
gcc version 4.7.0 (GCC)
Target: sparc-sun-solaris2.10
Configured with: ../gcc-4.7.0/configure --prefix=/h/local
--with-local-prefix=/h/local --with-gmp=/h/local --with-gnu-as --with-gnu-ld
--with-mpfr=/h/local --with-mpc=/h/local --with-local-prefix=/h/local
--enable-threads=posix --enable-languages=c,c++ --disable-nls
Compiler output:
$ gcc -c bug.c
bug_p.c: In function 'void f()':
bug_p.c:11:11: internal compiler error: Bus Error
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
-----bug.c-------------------------------------------------------
extern "C" {
extern double log (double);
extern float __logf(float);
extern "C++" {
float log(float __X) { return __logf(__X); }
}
}
void f()
{
log(2.0);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/53213] Internal compiler error in math.h
2012-05-03 13:48 [Bug c++/53213] New: Internal compiler error in math.h lbl2007 at gmx dot net
@ 2012-05-03 14:19 ` paolo.carlini at oracle dot com
2012-05-03 15:51 ` lbl2007 at gmx dot net
2012-05-04 9:00 ` lbl2007 at gmx dot net
2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-05-03 14:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53213
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ro at gcc dot gnu.org
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-03 14:16:52 UTC ---
Let's add Rainer in CC.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/53213] Internal compiler error in math.h
2012-05-03 13:48 [Bug c++/53213] New: Internal compiler error in math.h lbl2007 at gmx dot net
2012-05-03 14:19 ` [Bug c++/53213] " paolo.carlini at oracle dot com
@ 2012-05-03 15:51 ` lbl2007 at gmx dot net
2012-05-04 9:00 ` lbl2007 at gmx dot net
2 siblings, 0 replies; 4+ messages in thread
From: lbl2007 at gmx dot net @ 2012-05-03 15:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53213
--- Comment #2 from lbl2007 at gmx dot net 2012-05-03 15:51:06 UTC ---
The command to reproduce the error is "g++ bug.c", not "gcc bug.c"
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/53213] Internal compiler error in math.h
2012-05-03 13:48 [Bug c++/53213] New: Internal compiler error in math.h lbl2007 at gmx dot net
2012-05-03 14:19 ` [Bug c++/53213] " paolo.carlini at oracle dot com
2012-05-03 15:51 ` lbl2007 at gmx dot net
@ 2012-05-04 9:00 ` lbl2007 at gmx dot net
2 siblings, 0 replies; 4+ messages in thread
From: lbl2007 at gmx dot net @ 2012-05-04 9:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53213
lbl2007 at gmx dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WORKSFORME
--- Comment #3 from lbl2007 at gmx dot net 2012-05-04 08:59:28 UTC ---
The error occurs in mpfr_set_str() when using an unpatched version of MPFR 3.1.
Applying the latest cumulative patch
(http://www.mpfr.org/mpfr-current/allpatches) appears to solve the problem.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-04 9:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-03 13:48 [Bug c++/53213] New: Internal compiler error in math.h lbl2007 at gmx dot net
2012-05-03 14:19 ` [Bug c++/53213] " paolo.carlini at oracle dot com
2012-05-03 15:51 ` lbl2007 at gmx dot net
2012-05-04 9:00 ` lbl2007 at gmx dot net
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).