* [Bug c/16566] internal compiler error: Segmentation fault when compiling a C file.
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
@ 2004-07-15 14:17 ` ppelissi at caramail dot com
2004-07-15 14:41 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: ppelissi at caramail dot com @ 2004-07-15 14:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ppelissi at caramail dot com 2004-07-15 14:17 -------
Created an attachment (id=6753)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6753&action=view)
The preprocessed file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] internal compiler error: Segmentation fault when compiling a C file.
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
2004-07-15 14:17 ` [Bug c/16566] " ppelissi at caramail dot com
@ 2004-07-15 14:41 ` pinskia at gcc dot gnu dot org
2004-07-15 15:42 ` [Bug c/16566] ICE with flexible arrays bangerth at dealii dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-15 14:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-15 14:41 -------
On the mainline I do not get a seg fault but a normal ICE:
pr16566.c: In function `may_dump_rec':
pr16566.c:3565: internal compiler error: in create_tmp_var, at gimplify.c:358
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
2004-07-15 14:17 ` [Bug c/16566] " ppelissi at caramail dot com
2004-07-15 14:41 ` pinskia at gcc dot gnu dot org
@ 2004-07-15 15:42 ` bangerth at dealii dot org
2004-07-15 20:24 ` bangerth at dealii dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: bangerth at dealii dot org @ 2004-07-15 15:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-15 15:42 -------
Confirmed:
------------------------
struct S;
struct C {
int i;
struct S *tab[];
};
struct S { struct C c; };
void foo (struct S *x) {
foo(((void)1, x->c).tab[0]);
}
---------------------
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/gcc -c x.c
x.c: In function `foo':
x.c:11: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/gcc -c x.c
x.c: In function `foo':
x.c:11: internal compiler error: in create_tmp_var, at gimplify.c:358
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
This used to work with 3.2 and 3.3, so is a regression in 3.4 and mainline.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Known to fail| |3.4.0 3.5.0
Known to work| |3.2.3 3.3.4
Last reconfirmed|0000-00-00 00:00:00 |2004-07-15 15:42:34
date| |
Summary|internal compiler error: |ICE with flexible arrays
|Segmentation fault when |
|compiling a C file. |
Target Milestone|--- |3.4.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (2 preceding siblings ...)
2004-07-15 15:42 ` [Bug c/16566] ICE with flexible arrays bangerth at dealii dot org
@ 2004-07-15 20:24 ` bangerth at dealii dot org
2004-07-16 0:51 ` reichelt at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: bangerth at dealii dot org @ 2004-07-15 20:24 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2004-07-15 20:24 -------
*** Bug 16575 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (3 preceding siblings ...)
2004-07-15 20:24 ` bangerth at dealii dot org
@ 2004-07-16 0:51 ` reichelt at gcc dot gnu dot org
2004-08-09 0:22 ` [Bug middle-end/16566] [3.4 Regression] " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-07-16 0:51 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-07-16 00:51 -------
Even shorter example:
=============================
struct A
{
int i;
int x[];
};
int foo(struct A a)
{
return (a,a).x[0];
}
=============================
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Keywords| |monitored
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/16566] [3.4 Regression] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (4 preceding siblings ...)
2004-07-16 0:51 ` reichelt at gcc dot gnu dot org
@ 2004-08-09 0:22 ` pinskia at gcc dot gnu dot org
2004-08-09 0:25 ` [Bug middle-end/16566] [3.4/3.5 " pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-09 0:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-09 00:22 -------
: Search converges between 2003-11-07-trunk (#398) and 2003-11-08-trunk (#399).
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c |middle-end
Summary|ICE with flexible arrays |[3.4 Regression] ICE with
| |flexible arrays
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/16566] [3.4/3.5 Regression] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (5 preceding siblings ...)
2004-08-09 0:22 ` [Bug middle-end/16566] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2004-08-09 0:25 ` pinskia at gcc dot gnu dot org
2004-08-09 0:26 ` [Bug c/16566] " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-09 0:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-09 00:25 -------
The only thing during that time period that seems likely is:
2003-11-08 Joseph S. Myers <jsm@polyomino.org.uk>
* c-typeck.c (pedantic_lvalue_warning): Deprecate compound
expressions as lvalues.
(internal_build_compound_expr): Remove special handling for
non-pedantic case.
* doc/extend.texi: Document that all extended lvalues are now
deprecated.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] [3.4/3.5 Regression] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (6 preceding siblings ...)
2004-08-09 0:25 ` [Bug middle-end/16566] [3.4/3.5 " pinskia at gcc dot gnu dot org
@ 2004-08-09 0:26 ` pinskia at gcc dot gnu dot org
2004-08-09 11:23 ` Joseph S. Myers
2004-08-09 11:23 ` jsm at polyomino dot org dot uk
` (5 subsequent siblings)
13 siblings, 1 reply; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-09 0:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-09 00:26 -------
Which looks right as the following is produced:
{
return (a, NON_LVALUE_EXPR <a.x>)[0];
}
--
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |c
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Bug c/16566] [3.4/3.5 Regression] ICE with flexible arrays
2004-08-09 0:26 ` [Bug c/16566] " pinskia at gcc dot gnu dot org
@ 2004-08-09 11:23 ` Joseph S. Myers
0 siblings, 0 replies; 16+ messages in thread
From: Joseph S. Myers @ 2004-08-09 11:23 UTC (permalink / raw)
To: pinskia at gcc dot gnu dot org; +Cc: gcc-bugs
Note that this already fails with 3.2.3 if you use -std=c99 -pedantic.
Also note that though the code should be accepted, it has undefined
behavior if executed; a non-lvalue with structure with flexible array
member type is a value that does not refer to an object (other than a
temporary that disappears at the next sequence point), so members of the
flexible array can't be accessed without undefined behavior.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] [3.4/3.5 Regression] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (7 preceding siblings ...)
2004-08-09 0:26 ` [Bug c/16566] " pinskia at gcc dot gnu dot org
@ 2004-08-09 11:23 ` jsm at polyomino dot org dot uk
2004-08-11 21:05 ` jsm28 at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: jsm at polyomino dot org dot uk @ 2004-08-09 11:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jsm at polyomino dot org dot uk 2004-08-09 11:23 -------
Subject: Re: [3.4/3.5 Regression] ICE with flexible arrays
Note that this already fails with 3.2.3 if you use -std=c99 -pedantic.
Also note that though the code should be accepted, it has undefined
behavior if executed; a non-lvalue with structure with flexible array
member type is a value that does not refer to an object (other than a
temporary that disappears at the next sequence point), so members of the
flexible array can't be accessed without undefined behavior.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] [3.4/3.5 Regression] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (8 preceding siblings ...)
2004-08-09 11:23 ` jsm at polyomino dot org dot uk
@ 2004-08-11 21:05 ` jsm28 at gcc dot gnu dot org
2004-08-23 21:01 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2004-08-11 21:05 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |16989
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] [3.4/3.5 Regression] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (9 preceding siblings ...)
2004-08-11 21:05 ` jsm28 at gcc dot gnu dot org
@ 2004-08-23 21:01 ` mmitchel at gcc dot gnu dot org
2004-09-22 22:52 ` [Bug c/16566] [3.4/4.0 " cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-08-23 21:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-08-23 21:01 -------
Postponed until GCC 3.4.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.2 |3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] [3.4/4.0 Regression] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (10 preceding siblings ...)
2004-08-23 21:01 ` mmitchel at gcc dot gnu dot org
@ 2004-09-22 22:52 ` cvs-commit at gcc dot gnu dot org
2004-09-23 15:05 ` [Bug c/16566] [3.4 " cvs-commit at gcc dot gnu dot org
2004-09-23 15:59 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-22 22:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-09-22 22:52 -------
Subject: Bug 16566
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jsm28@gcc.gnu.org 2004-09-22 22:51:58
Modified files:
gcc : ChangeLog c-typeck.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/compile: pr16566-1.c pr16566-2.c
pr16566-3.c
Log message:
PR c/16566
* c-typeck.c (build_component_ref): Don't special-case
COMPOUND_EXPR.
testsuite:
* gcc.c-torture/compile/pr16566-1.c,
gcc.c-torture/compile/pr16566-2.c,
gcc.c-torture/compile/pr16566-3.c: New tests.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5568&r2=2.5569
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.377&r2=1.378
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4329&r2=1.4330
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr16566-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr16566-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr16566-3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] [3.4 Regression] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (11 preceding siblings ...)
2004-09-22 22:52 ` [Bug c/16566] [3.4/4.0 " cvs-commit at gcc dot gnu dot org
@ 2004-09-23 15:05 ` cvs-commit at gcc dot gnu dot org
2004-09-23 15:59 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-23 15:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-09-23 15:05 -------
Subject: Bug 16566
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: jsm28@gcc.gnu.org 2004-09-23 15:05:21
Modified files:
gcc : ChangeLog c-typeck.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/gcc.c-torture/compile: pr16566-1.c pr16566-2.c
pr16566-3.c
Log message:
PR c/16566
* c-typeck.c (build_component_ref): Don't special-case
COMPOUND_EXPR.
testsuite:
* gcc.c-torture/compile/pr16566-1.c,
gcc.c-torture/compile/pr16566-2.c,
gcc.c-torture/compile/pr16566-3.c: New tests.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.631&r2=2.2326.2.632
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.272.2.9&r2=1.272.2.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.271&r2=1.3389.2.272
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr16566-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr16566-2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/compile/pr16566-3.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c/16566] [3.4 Regression] ICE with flexible arrays
2004-07-15 14:16 [Bug c/16566] New: internal compiler error: Segmentation fault when compiling a C file ppelissi at caramail dot com
` (12 preceding siblings ...)
2004-09-23 15:05 ` [Bug c/16566] [3.4 " cvs-commit at gcc dot gnu dot org
@ 2004-09-23 15:59 ` pinskia at gcc dot gnu dot org
13 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-23 15:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-23 15:59 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16566
^ permalink raw reply [flat|nested] 16+ messages in thread