public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15759] New: "internal compiler error: Segmentation fault" on small isolated code.
@ 2004-06-01 8:57 larsnostdal at organizer dot net
2004-06-01 9:03 ` [Bug c++/15759] " larsnostdal at organizer dot net
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: larsnostdal at organizer dot net @ 2004-06-01 8:57 UTC (permalink / raw)
To: gcc-bugs
int defValue() { return(0); }
int(*defaultValue)() = defValue;
void a(int blah = defaultValue()) {}
int main() { a(); }
/*
$ g++ a.cpp -o a
a.cpp: In function `int main()':
a.cpp:20: internal compiler error: Segmentation fault
If I drop the indirection, like this:
void a(int blah = defValue()) {}
..it compiles.
*/
--
Summary: "internal compiler error: Segmentation fault" on small
isolated code.
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: larsnostdal at organizer dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15759
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/15759] "internal compiler error: Segmentation fault" on small isolated code.
2004-06-01 8:57 [Bug c++/15759] New: "internal compiler error: Segmentation fault" on small isolated code larsnostdal at organizer dot net
@ 2004-06-01 9:03 ` larsnostdal at organizer dot net
2004-06-01 9:19 ` larsnostdal at organizer dot net
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: larsnostdal at organizer dot net @ 2004-06-01 9:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From larsnostdal at organizer dot net 2004-06-01 09:03 -------
A friend of mine just tried these versions also:
2.95.3, 3.0.4, 3.1 and 3.2.3.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15759
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/15759] "internal compiler error: Segmentation fault" on small isolated code.
2004-06-01 8:57 [Bug c++/15759] New: "internal compiler error: Segmentation fault" on small isolated code larsnostdal at organizer dot net
2004-06-01 9:03 ` [Bug c++/15759] " larsnostdal at organizer dot net
@ 2004-06-01 9:19 ` larsnostdal at organizer dot net
2004-06-01 11:25 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: larsnostdal at organizer dot net @ 2004-06-01 9:19 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From larsnostdal at organizer dot net 2004-06-01 09:19 -------
This might be slightly off topic, but here's what I originally tried to do:
http://nostdal.net/paste/504e038a93391dfb6afc826af517524a.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15759
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/15759] "internal compiler error: Segmentation fault" on small isolated code.
2004-06-01 8:57 [Bug c++/15759] New: "internal compiler error: Segmentation fault" on small isolated code larsnostdal at organizer dot net
2004-06-01 9:03 ` [Bug c++/15759] " larsnostdal at organizer dot net
2004-06-01 9:19 ` larsnostdal at organizer dot net
@ 2004-06-01 11:25 ` pinskia at gcc dot gnu dot org
2004-06-01 14:18 ` bangerth at dealii dot org
2005-01-29 13:44 ` [Bug c++/15759] ICE with function pointers pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-01 11:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-01 11:25 -------
Confirmed. I think this is valid code, ICC 6.0 accepts it in strict mode.
pr15759.cc: In function `int main()':
pr15759.cc:6: internal compiler error: tree check: expected class 'E', have 'd' (var_decl) in bot_manip, at
cp/tree.c:1227
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Known to fail| |2.95.3 3.2.3 3.3.3 3.4.0
| |3.0.4 3.5.0
Last reconfirmed|0000-00-00 00:00:00 |2004-06-01 11:25:19
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15759
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/15759] "internal compiler error: Segmentation fault" on small isolated code.
2004-06-01 8:57 [Bug c++/15759] New: "internal compiler error: Segmentation fault" on small isolated code larsnostdal at organizer dot net
` (2 preceding siblings ...)
2004-06-01 11:25 ` pinskia at gcc dot gnu dot org
@ 2004-06-01 14:18 ` bangerth at dealii dot org
2005-01-29 13:44 ` [Bug c++/15759] ICE with function pointers pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2004-06-01 14:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-06-01 14:18 -------
The code is indeed valid. It fails since at least 2.95.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15759
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/15759] ICE with function pointers
2004-06-01 8:57 [Bug c++/15759] New: "internal compiler error: Segmentation fault" on small isolated code larsnostdal at organizer dot net
` (3 preceding siblings ...)
2004-06-01 14:18 ` bangerth at dealii dot org
@ 2005-01-29 13:44 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-29 13:44 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-29 13:43 -------
Note the following is make sure that we create correct code:
extern "C" void exit (int);
extern "C" void abort();
int defValue() { exit(0);return(0); }
int(*defaultValue)() = defValue;
void a(int blah = defaultValue()) {}
int main() { a(); abort (); }
And with checking not enabled we get the correct code (which I find werid but hey).
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-checking
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15759
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-01-29 13:44 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-01 8:57 [Bug c++/15759] New: "internal compiler error: Segmentation fault" on small isolated code larsnostdal at organizer dot net
2004-06-01 9:03 ` [Bug c++/15759] " larsnostdal at organizer dot net
2004-06-01 9:19 ` larsnostdal at organizer dot net
2004-06-01 11:25 ` pinskia at gcc dot gnu dot org
2004-06-01 14:18 ` bangerth at dealii dot org
2005-01-29 13:44 ` [Bug c++/15759] ICE with function pointers pinskia at gcc dot gnu dot org
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).