public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/30313] New: sizeof of expression including bit-field
@ 2006-12-28 2:42 s__nakayama at infoseek dot jp
2006-12-28 3:05 ` [Bug c/30313] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: s__nakayama at infoseek dot jp @ 2006-12-28 2:42 UTC (permalink / raw)
To: gcc-bugs
gcc rejects following valid code.
static inline void bar(){}
struct S
{
signed int i: 32;
};
int main()
{
struct S x = {32};
sizeof(x.i+0);
return 0;
}
gcc version: 4.2 20061212
--
Summary: sizeof of expression including bit-field
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: s__nakayama at infoseek dot jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1/4.2/4.3 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
@ 2006-12-28 3:05 ` pinskia at gcc dot gnu dot org
2007-01-08 4:06 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-28 3:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-12-28 03:05 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2006-12-28 03:05:44
date| |
Summary|sizeof of expression |[4.1/4.2/4.3 Regression]
|including bit-field |sizeof of expression
| |including bit-field
Target Milestone|--- |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1/4.2/4.3 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
2006-12-28 3:05 ` [Bug c/30313] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-01-08 4:06 ` pinskia at gcc dot gnu dot org
2007-01-08 22:41 ` janis at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-08 4:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-01-08 04:06 -------
The problem here is that the type of the component_ref is the same as the int
so when we fold the x.i+0 into x.i, we don't have a NOP_EXPR.
Janis,
Can you do a regression hunt on this bug?
Thanks,
Andrew
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |janis at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1/4.2/4.3 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
2006-12-28 3:05 ` [Bug c/30313] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2007-01-08 4:06 ` pinskia at gcc dot gnu dot org
@ 2007-01-08 22:41 ` janis at gcc dot gnu dot org
2007-01-25 6:04 ` mmitchel at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: janis at gcc dot gnu dot org @ 2007-01-08 22:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from janis at gcc dot gnu dot org 2007-01-08 22:41 -------
A regression hunt on powerpc-linux identified the following patch:
http://gcc.gnu.org/viewcvs?view=rev&rev=99840
r99840 | hubicka | 2005-05-17 16:56:32 +0000 (Tue, 17 May 2005)
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1/4.2/4.3 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
` (2 preceding siblings ...)
2007-01-08 22:41 ` janis at gcc dot gnu dot org
@ 2007-01-25 6:04 ` mmitchel at gcc dot gnu dot org
2007-01-29 16:13 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-01-25 6:04 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1/4.2/4.3 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
` (3 preceding siblings ...)
2007-01-25 6:04 ` mmitchel at gcc dot gnu dot org
@ 2007-01-29 16:13 ` rguenth at gcc dot gnu dot org
2007-01-29 16:16 ` rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-01-29 16:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2007-01-29 16:13 -------
We also are 'in_gimple_form', so non_lvalue doesn't do anything on us in
non-unit-at-a-time mode. With -funit-at-a-time the testcase is fine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1/4.2/4.3 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
` (4 preceding siblings ...)
2007-01-29 16:13 ` rguenth at gcc dot gnu dot org
@ 2007-01-29 16:16 ` rguenth at gcc dot gnu dot org
2007-01-30 10:17 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-01-29 16:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2007-01-29 16:16 -------
I'm testing the following:
Index: passes.c
===================================================================
*** passes.c (revision 121287)
--- passes.c (working copy)
*************** execute_one_pass (struct tree_opt_pass *
*** 1054,1059 ****
--- 1054,1062 ----
dump_file = NULL;
}
+ /* Reset in_gimple_form to not break non-unit-at-a-time mode. */
+ in_gimple_form = false;
+
return true;
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2006-12-28 03:05:44 |2007-01-29 16:16:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1/4.2/4.3 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
` (5 preceding siblings ...)
2007-01-29 16:16 ` rguenth at gcc dot gnu dot org
@ 2007-01-30 10:17 ` rguenth at gcc dot gnu dot org
2007-01-30 10:19 ` [Bug c/30313] [4.1/4.2 " rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-01-30 10:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2007-01-30 10:17 -------
Subject: Bug 30313
Author: rguenth
Date: Tue Jan 30 10:17:09 2007
New Revision: 121334
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121334
Log:
2007-01-30 Richard Guenther <rguenther@suse.de>
PR middle-end/30313
* passes.c (execute_one_pass): Reset in_gimple_form to not
confuse non-unit-at-a-time mode.
* gcc.dg/torture/pr30313.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/torture/pr30313.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/passes.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1/4.2 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
` (6 preceding siblings ...)
2007-01-30 10:17 ` rguenth at gcc dot gnu dot org
@ 2007-01-30 10:19 ` rguenth at gcc dot gnu dot org
2007-01-30 13:35 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-01-30 10:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2007-01-30 10:19 -------
Fixed on the mainline.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.1.0 4.1.1 4.1.2
Known to work| |4.3.0 4.0.3
Summary|[4.1/4.2/4.3 Regression] |[4.1/4.2 Regression] sizeof
|sizeof of expression |of expression including bit-
|including bit-field |field
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
` (8 preceding siblings ...)
2007-01-30 13:35 ` rguenth at gcc dot gnu dot org
@ 2007-01-30 13:35 ` rguenth at gcc dot gnu dot org
2007-02-14 9:02 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-01-30 13:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rguenth at gcc dot gnu dot org 2007-01-30 13:34 -------
And 4.2.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|4.3.0 4.0.3 |4.3.0 4.2.0 4.0.3
Summary|[4.1/4.2 Regression] sizeof |[4.1 Regression] sizeof of
|of expression including bit-|expression including bit-
|field |field
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1/4.2 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
` (7 preceding siblings ...)
2007-01-30 10:19 ` [Bug c/30313] [4.1/4.2 " rguenth at gcc dot gnu dot org
@ 2007-01-30 13:35 ` rguenth at gcc dot gnu dot org
2007-01-30 13:35 ` [Bug c/30313] [4.1 " rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-01-30 13:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2007-01-30 13:34 -------
Subject: Bug 30313
Author: rguenth
Date: Tue Jan 30 13:34:10 2007
New Revision: 121338
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121338
Log:
2007-01-30 Richard Guenther <rguenther@suse.de>
PR middle-end/30313
* passes.c (execute_one_pass): Reset in_gimple_form to not
confuse non-unit-at-a-time mode.
* gcc.dg/torture/pr30313.c: New testcase.
Added:
branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/torture/pr30313.c
- copied unchanged from r121334,
trunk/gcc/testsuite/gcc.dg/torture/pr30313.c
Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/passes.c
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
` (9 preceding siblings ...)
2007-01-30 13:35 ` [Bug c/30313] [4.1 " rguenth at gcc dot gnu dot org
@ 2007-02-14 9:02 ` mmitchel at gcc dot gnu dot org
2007-02-14 13:56 ` rguenth at gcc dot gnu dot org
2007-02-14 13:56 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-02-14 9:02 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.2 |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
` (11 preceding siblings ...)
2007-02-14 13:56 ` rguenth at gcc dot gnu dot org
@ 2007-02-14 13:56 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-02-14 13:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2007-02-14 13:56 -------
Subject: Bug 30313
Author: rguenth
Date: Wed Feb 14 13:56:07 2007
New Revision: 121949
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=121949
Log:
2007-02-14 Richard Guenther <rguenther@suse.de>
Backport from mainline:
2007-01-30 Richard Guenther <rguenther@suse.de>
PR middle-end/30313
* passes.c (execute_one_pass): Reset in_gimple_form to not
confuse non-unit-at-a-time mode.
* gcc.dg/torture/pr30313.c: New testcase.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/torture/pr30313.c
- copied unchanged from r121334,
trunk/gcc/testsuite/gcc.dg/torture/pr30313.c
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/passes.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c/30313] [4.1 Regression] sizeof of expression including bit-field
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
` (10 preceding siblings ...)
2007-02-14 9:02 ` mmitchel at gcc dot gnu dot org
@ 2007-02-14 13:56 ` rguenth at gcc dot gnu dot org
2007-02-14 13:56 ` rguenth at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-02-14 13:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenth at gcc dot gnu dot org 2007-02-14 13:56 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work|4.3.0 4.2.0 4.0.3 |4.3.0 4.2.0 4.1.3 4.0.3
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30313
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2007-02-14 13:56 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-28 2:42 [Bug c/30313] New: sizeof of expression including bit-field s__nakayama at infoseek dot jp
2006-12-28 3:05 ` [Bug c/30313] [4.1/4.2/4.3 Regression] " pinskia at gcc dot gnu dot org
2007-01-08 4:06 ` pinskia at gcc dot gnu dot org
2007-01-08 22:41 ` janis at gcc dot gnu dot org
2007-01-25 6:04 ` mmitchel at gcc dot gnu dot org
2007-01-29 16:13 ` rguenth at gcc dot gnu dot org
2007-01-29 16:16 ` rguenth at gcc dot gnu dot org
2007-01-30 10:17 ` rguenth at gcc dot gnu dot org
2007-01-30 10:19 ` [Bug c/30313] [4.1/4.2 " rguenth at gcc dot gnu dot org
2007-01-30 13:35 ` rguenth at gcc dot gnu dot org
2007-01-30 13:35 ` [Bug c/30313] [4.1 " rguenth at gcc dot gnu dot org
2007-02-14 9:02 ` mmitchel at gcc dot gnu dot org
2007-02-14 13:56 ` rguenth at gcc dot gnu dot org
2007-02-14 13:56 ` rguenth 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).