public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array
@ 2006-05-22 13:34 reichelt at gcc dot gnu dot org
2006-05-22 13:55 ` [Bug c++/27722] " pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-22 13:34 UTC (permalink / raw)
To: gcc-bugs
The C++ frontend crashes since GCC 4.0.3 on the following invalid code
snippet:
=================================
void foo()
{
const int x[] = 0;
++x;
}
=================================
bug.cc: In function 'void foo()':
bug.cc:3: error: initializer fails to determine size of 'x'
bug.cc:3: error: cannot convert 'int' to 'const int [1]' in initialization
bug.cc:4: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in get_unwidened, at tree.c:5322
Please submit a full bug report, [etc.]
--
Summary: [4.0/4.1/4.2 regression] ICE incrementing an array
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27722
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/27722] [4.0/4.1/4.2 regression] ICE incrementing an array
2006-05-22 13:34 [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array reichelt at gcc dot gnu dot org
@ 2006-05-22 13:55 ` pinskia at gcc dot gnu dot org
2006-05-26 14:56 ` bangerth at dealii dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-22 13:55 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Target Milestone|--- |4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27722
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/27722] [4.0/4.1/4.2 regression] ICE incrementing an array
2006-05-22 13:34 [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array reichelt at gcc dot gnu dot org
2006-05-22 13:55 ` [Bug c++/27722] " pinskia at gcc dot gnu dot org
@ 2006-05-26 14:56 ` bangerth at dealii dot org
2006-06-04 19:21 ` mmitchel at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: bangerth at dealii dot org @ 2006-05-26 14:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from bangerth at dealii dot org 2006-05-26 14:56 -------
This didn't fail with 4.0.2pre, so it must be a regression on a release branch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27722
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/27722] [4.0/4.1/4.2 regression] ICE incrementing an array
2006-05-22 13:34 [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array reichelt at gcc dot gnu dot org
2006-05-22 13:55 ` [Bug c++/27722] " pinskia at gcc dot gnu dot org
2006-05-26 14:56 ` bangerth at dealii dot org
@ 2006-06-04 19:21 ` mmitchel at gcc dot gnu dot org
2006-06-05 2:52 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 19:21 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27722
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/27722] [4.0/4.1/4.2 regression] ICE incrementing an array
2006-05-22 13:34 [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2006-06-04 19:21 ` mmitchel at gcc dot gnu dot org
@ 2006-06-05 2:52 ` mmitchel at gcc dot gnu dot org
2006-06-05 2:53 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-05 2:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from mmitchel at gcc dot gnu dot org 2006-06-05 02:46 -------
Subject: Bug 27722
Author: mmitchel
Date: Mon Jun 5 02:46:38 2006
New Revision: 114382
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114382
Log:
PR c++/27819
* decl.c (cp_finish_decl): Process initializers for static data
members with non-dependent initializers, even in templates.
PR c++/27722
* decl.c (maybe_deduce_size_from_array_init): If the declaration
is erroneous, give it an erroneous type.
(layout_var_decl): If the type is erroneous, give up.
(check_initializer): Likewise.
PR c++/27807
* cp-tree.h (TYPE_OBJ_P): New macro.
(TYPE_PTROB_P): Use it.
(TYPE_REF_OBJ_P): Likewise.
* semantics.c (finish_compound_literal): Do not permit compound
literals of non-object types.
PR c++/27806
* typeck.c (original_type): Robustify.
PR c++/27819
* g++.dg/template/static25.C: New test.
PR c++/27722
* g++.dg/init/array21.C: New test.
PR c++/27807
* g++.dg/ext/complit7.C: New test.
PR c++/27806
* g++.dg/parse/ptrmem5.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/ext/complit7.C
trunk/gcc/testsuite/g++.dg/init/array21.C
trunk/gcc/testsuite/g++.dg/parse/ptrmem5.C
trunk/gcc/testsuite/g++.dg/template/static25.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/semantics.c
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27722
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/27722] [4.0/4.1/4.2 regression] ICE incrementing an array
2006-05-22 13:34 [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2006-06-05 2:52 ` mmitchel at gcc dot gnu dot org
@ 2006-06-05 2:53 ` mmitchel at gcc dot gnu dot org
2006-06-05 3:08 ` [Bug c++/27722] [4.0 " mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-05 2:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mmitchel at gcc dot gnu dot org 2006-06-05 02:52 -------
Subject: Bug 27722
Author: mmitchel
Date: Mon Jun 5 02:52:37 2006
New Revision: 114383
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114383
Log:
PR c++/27819
* decl.c (cp_finish_decl): Process initializers for static data
members with non-dependent initializers, even in templates.
PR c++/27722
* decl.c (maybe_deduce_size_from_array_init): If the declaration
is erroneous, give it an erroneous type.
(layout_var_decl): If the type is erroneous, give up.
(check_initializer): Likewise.
PR c++/27807
* cp-tree.h (TYPE_OBJ_P): New macro.
(TYPE_PTROB_P): Use it.
(TYPE_REF_OBJ_P): Likewise.
* semantics.c (finish_compound_literal): Do not permit compound
literals of non-object types.
PR c++/27806
* typeck.c (original_type): Robustify.
PR c++/27819
* g++.dg/template/static25.C: New test.
PR c++/27722
* g++.dg/init/array21.C: New test.
PR c++/27807
* g++.dg/ext/complit7.C: New test.
PR c++/27806
* g++.dg/parse/ptrmem5.C: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/ext/complit7.C
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/init/array21.C
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/parse/ptrmem5.C
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/template/static25.C
Modified:
branches/gcc-4_1-branch/gcc/cp/ChangeLog
branches/gcc-4_1-branch/gcc/cp/cp-tree.h
branches/gcc-4_1-branch/gcc/cp/decl.c
branches/gcc-4_1-branch/gcc/cp/semantics.c
branches/gcc-4_1-branch/gcc/cp/typeck.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27722
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/27722] [4.0 regression] ICE incrementing an array
2006-05-22 13:34 [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2006-06-05 2:53 ` mmitchel at gcc dot gnu dot org
@ 2006-06-05 3:08 ` mmitchel at gcc dot gnu dot org
2006-06-06 14:26 ` reichelt at gcc dot gnu dot org
2007-01-31 23:16 ` reichelt at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-05 3:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from mmitchel at gcc dot gnu dot org 2006-06-05 02:54 -------
Fixed in 4.1.2, 4.2.0.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
| |dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-06-05 02:54:59
date| |
Summary|[4.0/4.1/4.2 regression] ICE|[4.0 regression] ICE
|incrementing an array |incrementing an array
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27722
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/27722] [4.0 regression] ICE incrementing an array
2006-05-22 13:34 [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2006-06-05 3:08 ` [Bug c++/27722] [4.0 " mmitchel at gcc dot gnu dot org
@ 2006-06-06 14:26 ` reichelt at gcc dot gnu dot org
2007-01-31 23:16 ` reichelt at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-06-06 14:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from reichelt at gcc dot gnu dot org 2006-06-06 14:21 -------
Btw, the fix for PR27804 fixed the problem on mainline before Mark's patch
went in. (This might be interesting for a backport to the 4.0 branch.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27722
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/27722] [4.0 regression] ICE incrementing an array
2006-05-22 13:34 [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2006-06-06 14:26 ` reichelt at gcc dot gnu dot org
@ 2007-01-31 23:16 ` reichelt at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-01-31 23:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from reichelt at gcc dot gnu dot org 2007-01-31 23:16 -------
Seems to be fixed in GCC 4.0.4.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27722
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-01-31 23:16 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-22 13:34 [Bug c++/27722] New: [4.0/4.1/4.2 regression] ICE incrementing an array reichelt at gcc dot gnu dot org
2006-05-22 13:55 ` [Bug c++/27722] " pinskia at gcc dot gnu dot org
2006-05-26 14:56 ` bangerth at dealii dot org
2006-06-04 19:21 ` mmitchel at gcc dot gnu dot org
2006-06-05 2:52 ` mmitchel at gcc dot gnu dot org
2006-06-05 2:53 ` mmitchel at gcc dot gnu dot org
2006-06-05 3:08 ` [Bug c++/27722] [4.0 " mmitchel at gcc dot gnu dot org
2006-06-06 14:26 ` reichelt at gcc dot gnu dot org
2007-01-31 23:16 ` reichelt 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).