public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52385] New: [C++0x][constexpr] Segfault in constexpr
@ 2012-02-26 1:55 philipp.classen at gmx dot net
2012-02-26 10:30 ` [Bug c++/52385] " paolo.carlini at oracle dot com
0 siblings, 1 reply; 2+ messages in thread
From: philipp.classen at gmx dot net @ 2012-02-26 1:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52385
Bug #: 52385
Summary: [C++0x][constexpr] Segfault in constexpr
Classification: Unclassified
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: philipp.classen@gmx.net
Created attachment 26754
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26754
preprocessed file
Compiling the following programm (.ii file is attached) with "g++ -g
-std=c++0x" crashes:
constexpr int minus(int x, int y, int j1 = 0, int j2 = 0) {
return j1 == x - y ? j1 : (j2 == x - y ? j2 : minus(x, y, j1 + 1, j2 - 1));
}
int main() {
constexpr int result = minus(290321321, 31721711);
return result;
}
Output:
g++ -g -std=c++0x -o main main.cpp
g++: internal compiler error: Segmentation fault (program cc1plus)
...
gcc -v
Using built-in specs.
COLLECT_GCC=/opt/gcc/bin/gcc
COLLECT_LTO_WRAPPER=/opt/gcc-4.6.0/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/opt/gcc-4.6.0
Thread model: posix
gcc version 4.6.0 (GCC)
uname -a
Linux terra-ubuntu-vm 2.6.38-13-generic #54-Ubuntu SMP Tue Jan 3 13:38:12 UTC
2012 x86_64 x86_64 x86_64 GNU/Linux
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/52385] [C++0x][constexpr] Segfault in constexpr
2012-02-26 1:55 [Bug c++/52385] New: [C++0x][constexpr] Segfault in constexpr philipp.classen at gmx dot net
@ 2012-02-26 10:30 ` paolo.carlini at oracle dot com
0 siblings, 0 replies; 2+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-02-26 10:30 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52385
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC|philipp.classen at gmx dot |
|net |
Known to work| |4.6.2, 4.7.0
Resolution| |WORKSFORME
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-02-26 10:13:12 UTC ---
Already fixed mainline and 4_6-branch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-02-26 10:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-26 1:55 [Bug c++/52385] New: [C++0x][constexpr] Segfault in constexpr philipp.classen at gmx dot net
2012-02-26 10:30 ` [Bug c++/52385] " paolo.carlini at oracle dot com
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).