public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42387] New: Getting internal compiler error.
@ 2009-12-16 0:03 parviz_fariborz at mentor dot com
2009-12-16 0:05 ` [Bug c++/42387] " parviz_fariborz at mentor dot com
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: parviz_fariborz at mentor dot com @ 2009-12-16 0:03 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
Version :
cape1:/home/parvizf/tmp=> /tools/linux64/gcc-4.4.2/bin/gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Compile command line output :
cape1:/home/parvizf/tmp/gcc_buf> /tools/linux64/gcc-4.4.2/bin/gcc -o test -Wall
-save-temps test.cc
test.cc: In constructor AvlTreeIter<PF>::AvlTreeIter(const AvlTree<PF>*):
test.cc:48: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
--
Summary: Getting internal compiler error.
Product: gcc
Version: 4.2.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: parviz_fariborz at mentor dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/42387] Getting internal compiler error.
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
@ 2009-12-16 0:05 ` parviz_fariborz at mentor dot com
2009-12-16 0:54 ` [Bug c++/42387] [4.4 / 4.5 Regression] " paolo dot carlini at oracle dot com
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: parviz_fariborz at mentor dot com @ 2009-12-16 0:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from parviz_fariborz at mentor dot com 2009-12-16 00:05 -------
Created an attachment (id=19315)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19315&action=view)
The output of -save-temps gcc switch
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/42387] [4.4 / 4.5 Regression] Getting internal compiler error.
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
2009-12-16 0:05 ` [Bug c++/42387] " parviz_fariborz at mentor dot com
@ 2009-12-16 0:54 ` paolo dot carlini at oracle dot com
2009-12-16 1:11 ` [Bug c++/42387] [4.4 / 4.5 Regression] ICE with new expression in class template paolo dot carlini at oracle dot com
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-16 0:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2009-12-16 00:53 -------
Gosh, this is enough. The ICE disappears if AvlTreeIter isn't a template:
template<class PF>
struct AvlTreeIter
{
int Num();
AvlTreeIter()
{
new (void* [Num()]);
}
};
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Known to fail| |4.4.1 4.4.2 4.5.0
Known to work| |4.3.4
Last reconfirmed|0000-00-00 00:00:00 |2009-12-16 00:53:43
date| |
Summary|Getting internal compiler |[4.4 / 4.5 Regression]
|error. |Getting internal compiler
| |error.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/42387] [4.4 / 4.5 Regression] ICE with new expression in class template
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
2009-12-16 0:05 ` [Bug c++/42387] " parviz_fariborz at mentor dot com
2009-12-16 0:54 ` [Bug c++/42387] [4.4 / 4.5 Regression] " paolo dot carlini at oracle dot com
@ 2009-12-16 1:11 ` paolo dot carlini at oracle dot com
2009-12-16 9:35 ` jakub at gcc dot gnu dot org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-16 1:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from paolo dot carlini at oracle dot com 2009-12-16 01:10 -------
In mainline the ICE happens like this:
#0 0x00000000007613e0 in fold_convert_loc (loc=0, type=0x7ffff7e9f000,
arg=0x7ffff7e8d9f0) at ../../trunk/gcc/fold-const.c:2629
#1 0x000000000075aa5f in associate_trees (loc=0, t1=0x7ffff7e8d9f0,
t2=0x7ffff7e8a690, code=PLUS_EXPR, type=0x7ffff7e9f000) at
../../trunk/gcc/fold-const.c:1598
#2 0x00000000007aa3f0 in fold_binary_loc (loc=0, code=PLUS_EXPR,
type=0x7ffff7e9f000, op0=0x7ffff7fc10a8, op1=0x7ffff7e8a758) at
../../trunk/gcc/fold-const.c:10678
#3 0x00000000007e6b97 in fold_build2_stat_loc (loc=0, code=PLUS_EXPR,
type=0x7ffff7e9f000, op0=0x7ffff7fc10a8, op1=0x7ffff7e8a758) at
../../trunk/gcc/fold-const.c:14460
#4 0x00000000007a34e1 in fold_binary_loc (loc=0, code=PLUS_EXPR,
type=0x7ffff7e9f000, op0=0x7ffff7e8a758, op1=0x7ffff7fc10a8) at
../../trunk/gcc/fold-const.c:10095
#5 0x00000000007e6b97 in fold_build2_stat_loc (loc=0, code=PLUS_EXPR,
type=0x7ffff7e9f000, op0=0x7ffff7e8a758, op1=0x7ffff7fc10a8) at
../../trunk/gcc/fold-const.c:14460
#6 0x000000000075d6e1 in size_binop_loc (loc=0, code=PLUS_EXPR,
arg0=0x7ffff7e8a758, arg1=0x7ffff7fc10a8) at ../../trunk/gcc/fold-const.c:2183
#7 0x000000000093f329 in layout_type (type=0x7ffff5b38498) at
../../trunk/gcc/stor-layout.c:1975
#8 0x0000000000591b88 in complete_type (type=0x7ffff5b38498) at
../../trunk/gcc/cp/typeck.c:118
#9 0x0000000000591e69 in complete_type_or_else (type=0x0,
value=0x7ffff7e9f000) at ../../trunk/gcc/cp/typeck.c:142
#10 0x00000000005afc6a in build_new (placement=0x7fffffffd440,
type=0x7ffff5b38498, nelts=0x0, init=0x7fffffffd438, use_global_new=-135663616,
complain=3) at ../../trunk/gcc/cp/init.c:2389
#11 0x00000000005707c6 in cp_parser_new_expression (parser=0x7ffff5b37000) at
../../trunk/gcc/cp/parser.c:5783
...
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
Priority|P3 |P2
Summary|[4.4 / 4.5 Regression] |[4.4 / 4.5 Regression] ICE
|Getting internal compiler |with new expression in class
|error. |template
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/42387] [4.4 / 4.5 Regression] ICE with new expression in class template
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
` (2 preceding siblings ...)
2009-12-16 1:11 ` [Bug c++/42387] [4.4 / 4.5 Regression] ICE with new expression in class template paolo dot carlini at oracle dot com
@ 2009-12-16 9:35 ` jakub at gcc dot gnu dot org
2009-12-16 10:11 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-12-16 9:35 UTC (permalink / raw)
To: gcc-bugs
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu dot org
Target Milestone|--- |4.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/42387] [4.4 / 4.5 Regression] ICE with new expression in class template
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
` (3 preceding siblings ...)
2009-12-16 9:35 ` jakub at gcc dot gnu dot org
@ 2009-12-16 10:11 ` jakub at gcc dot gnu dot org
2009-12-16 10:45 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-12-16 10:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2009-12-16 10:10 -------
Caused by PR28879 fix:
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144988
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/42387] [4.4 / 4.5 Regression] ICE with new expression in class template
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
` (4 preceding siblings ...)
2009-12-16 10:11 ` jakub at gcc dot gnu dot org
@ 2009-12-16 10:45 ` jakub at gcc dot gnu dot org
2009-12-16 14:13 ` [Bug c++/42387] [4.4/4.5 " jason at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-12-16 10:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2009-12-16 10:44 -------
This exact spot of ICE can be fixed with e.g.:
--- init.c.jj 2009-12-02 09:37:36.000000000 +0100
+++ init.c 2009-12-16 11:32:52.000000000 +0100
@@ -2386,7 +2386,16 @@ build_new (VEC(tree,gc) **placement, tre
/* The type allocated must be complete. If the new-type-id was
"T[N]" then we are just checking that "T" is complete here, but
that is equivalent, since the value of "N" doesn't matter. */
- if (!complete_type_or_else (type, NULL_TREE))
+ if (processing_template_decl
+ && TREE_CODE (type) == ARRAY_TYPE
+ && TYPE_DOMAIN (type)
+ && TYPE_MAX_VALUE (TYPE_DOMAIN (type))
+ && TREE_SIDE_EFFECTS (TYPE_MAX_VALUE (TYPE_DOMAIN (type))))
+ {
+ if (!complete_type_or_else (TREE_TYPE (type), NULL_TREE))
+ return error_mark_node;
+ }
+ else if (!complete_type_or_else (type, NULL_TREE))
return error_mark_node;
rval = build_new_1 (placement, type, nelts, init, use_global_new, complain);
but then we ICE in array_type_nelts_top called from build_new_1. So, either
when processing_template_decl and TYPE_MAX_VALUE of ARRAY_TYPE's TYPE_DOMAIN
has side-effects we just shouldn't call build_new_1, or build_new_1 will need
to be prepared for it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/42387] [4.4/4.5 Regression] ICE with new expression in class template
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
` (5 preceding siblings ...)
2009-12-16 10:45 ` jakub at gcc dot gnu dot org
@ 2009-12-16 14:13 ` jason at gcc dot gnu dot org
2009-12-16 17:36 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-12-16 14:13 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2009-12-16 00:53:43 |2009-12-16 14:13:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/42387] [4.4/4.5 Regression] ICE with new expression in class template
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
` (6 preceding siblings ...)
2009-12-16 14:13 ` [Bug c++/42387] [4.4/4.5 " jason at gcc dot gnu dot org
@ 2009-12-16 17:36 ` jason at gcc dot gnu dot org
2009-12-16 18:03 ` jason at gcc dot gnu dot org
2009-12-16 18:03 ` jason at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-12-16 17:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jason at gcc dot gnu dot org 2009-12-16 17:36 -------
Subject: Bug 42387
Author: jason
Date: Wed Dec 16 17:36:05 2009
New Revision: 155292
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155292
Log:
PR c++/42387
* decl.c (compute_array_index_type): Mark a VLA as dependent.
Added:
trunk/gcc/testsuite/g++.dg/ext/vla8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/42387] [4.4/4.5 Regression] ICE with new expression in class template
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
` (8 preceding siblings ...)
2009-12-16 18:03 ` jason at gcc dot gnu dot org
@ 2009-12-16 18:03 ` jason at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-12-16 18:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jason at gcc dot gnu dot org 2009-12-16 18:03 -------
Fixed.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/42387] [4.4/4.5 Regression] ICE with new expression in class template
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
` (7 preceding siblings ...)
2009-12-16 17:36 ` jason at gcc dot gnu dot org
@ 2009-12-16 18:03 ` jason at gcc dot gnu dot org
2009-12-16 18:03 ` jason at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-12-16 18:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jason at gcc dot gnu dot org 2009-12-16 18:02 -------
Subject: Bug 42387
Author: jason
Date: Wed Dec 16 18:02:38 2009
New Revision: 155293
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155293
Log:
PR c++/42387
* decl.c (compute_array_index_type): Mark a VLA as dependent.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/ext/vla8.C
Modified:
branches/gcc-4_4-branch/gcc/cp/ChangeLog
branches/gcc-4_4-branch/gcc/cp/decl.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42387
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-12-16 18:03 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-16 0:03 [Bug c++/42387] New: Getting internal compiler error parviz_fariborz at mentor dot com
2009-12-16 0:05 ` [Bug c++/42387] " parviz_fariborz at mentor dot com
2009-12-16 0:54 ` [Bug c++/42387] [4.4 / 4.5 Regression] " paolo dot carlini at oracle dot com
2009-12-16 1:11 ` [Bug c++/42387] [4.4 / 4.5 Regression] ICE with new expression in class template paolo dot carlini at oracle dot com
2009-12-16 9:35 ` jakub at gcc dot gnu dot org
2009-12-16 10:11 ` jakub at gcc dot gnu dot org
2009-12-16 10:45 ` jakub at gcc dot gnu dot org
2009-12-16 14:13 ` [Bug c++/42387] [4.4/4.5 " jason at gcc dot gnu dot org
2009-12-16 17:36 ` jason at gcc dot gnu dot org
2009-12-16 18:03 ` jason at gcc dot gnu dot org
2009-12-16 18:03 ` jason 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).