public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35336] New: Broken diagnostic: 'bit_field_ref' not supported by dump_expr
@ 2008-02-23 19:48 reichelt at gcc dot gnu dot org
2008-03-04 20:00 ` [Bug c++/35336] " rguenth 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 @ 2008-02-23 19:48 UTC (permalink / raw)
To: gcc-bugs
A broken diagnostic is issued for the following invalid code snippet since
at least GCC 2.95.3:
====================================================
struct A
{
int i : 2;
};
void foo(bool b)
{
A a;
(a.i || b)();
}
====================================================
bug.cc: In function 'void foo(bool)':
bug.cc:9: error: '(((#'bit_field_ref' not supported by dump_expr#<expression
error> & 3u) != 0u) || b)' cannot be used as a function
--
Summary: Broken diagnostic: 'bit_field_ref' not supported by
dump_expr
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: diagnostic, 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=35336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/35336] Broken diagnostic: 'bit_field_ref' not supported by dump_expr
2008-02-23 19:48 [Bug c++/35336] New: Broken diagnostic: 'bit_field_ref' not supported by dump_expr reichelt at gcc dot gnu dot org
@ 2008-03-04 20:00 ` rguenth at gcc dot gnu dot org
2008-03-05 10:33 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-04 20:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-03-04 19:59 -------
I happen to have a "fix".
--
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|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-03-04 19:59:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/35336] Broken diagnostic: 'bit_field_ref' not supported by dump_expr
2008-02-23 19:48 [Bug c++/35336] New: Broken diagnostic: 'bit_field_ref' not supported by dump_expr reichelt at gcc dot gnu dot org
2008-03-04 20:00 ` [Bug c++/35336] " rguenth at gcc dot gnu dot org
@ 2008-03-05 10:33 ` rguenth at gcc dot gnu dot org
2008-03-14 16:21 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-05 10:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-03-05 10:32 -------
Subject: Bug 35336
Author: rguenth
Date: Wed Mar 5 10:32:07 2008
New Revision: 132894
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132894
Log:
2008-03-05 Richard Guenther <rguenther@suse.de>
PR c++/35336
* tree.def (BIT_FIELD_REF): Document that operands 1 and 2
should be constants.
* tree-cfg.c (verify_expr): Verify it.
* fold-const.c (fold_truthop): Remove code generating
BIT_FIELD_REFs of structure bases.
(fold_binary): Likewise.
(fold_ternary): Position and size of BIT_FIELD_REFs are
always host integers.
(make_bit_field_ref): Remove.
(optimize_bit_field_compare): Remove.
(all_ones_mask_p): Remove.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/tree-cfg.c
trunk/gcc/tree.def
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/35336] Broken diagnostic: 'bit_field_ref' not supported by dump_expr
2008-02-23 19:48 [Bug c++/35336] New: Broken diagnostic: 'bit_field_ref' not supported by dump_expr reichelt at gcc dot gnu dot org
2008-03-04 20:00 ` [Bug c++/35336] " rguenth at gcc dot gnu dot org
2008-03-05 10:33 ` rguenth at gcc dot gnu dot org
@ 2008-03-14 16:21 ` rguenth at gcc dot gnu dot org
2008-06-11 11:16 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-14 16:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-03-14 16:20 -------
Oh, fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/35336] Broken diagnostic: 'bit_field_ref' not supported by dump_expr
2008-02-23 19:48 [Bug c++/35336] New: Broken diagnostic: 'bit_field_ref' not supported by dump_expr reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-03-14 16:21 ` rguenth at gcc dot gnu dot org
@ 2008-06-11 11:16 ` rguenth at gcc dot gnu dot org
2008-06-21 20:58 ` reichelt at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-11 11:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2008-06-11 11:15 -------
Subject: Bug 35336
Author: rguenth
Date: Wed Jun 11 11:14:59 2008
New Revision: 136662
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136662
Log:
2008-06-11 Richard Guenther <rguenther@suse.de>
PR middle-end/35336
* fold-const.c (fold_truthop): Remove code generating
BIT_FIELD_REFs of structure bases.
(fold_binary): Likewise.
(make_bit_field_ref): Remove.
(optimize_bit_field_compare): Remove.
(all_ones_mask_p): Remove.
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/fold-const.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/35336] Broken diagnostic: 'bit_field_ref' not supported by dump_expr
2008-02-23 19:48 [Bug c++/35336] New: Broken diagnostic: 'bit_field_ref' not supported by dump_expr reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-06-11 11:16 ` rguenth at gcc dot gnu dot org
@ 2008-06-21 20:58 ` reichelt at gcc dot gnu dot org
2008-09-13 1:24 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-06-21 20:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from reichelt at gcc dot gnu dot org 2008-06-21 20:57 -------
Also fixed on the 4.3 branch.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.4.0 |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/35336] Broken diagnostic: 'bit_field_ref' not supported by dump_expr
2008-02-23 19:48 [Bug c++/35336] New: Broken diagnostic: 'bit_field_ref' not supported by dump_expr reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-06-21 20:58 ` reichelt at gcc dot gnu dot org
@ 2008-09-13 1:24 ` reichelt at gcc dot gnu dot org
2008-12-05 17:02 ` jakub at gcc dot gnu dot org
2008-12-05 21:13 ` jakub at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-09-13 1:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from reichelt at gcc dot gnu dot org 2008-09-13 01:23 -------
The bug reappeared on the 4.3 branch.
It remains fixed on mainline, though.
So no status change since it's not a regression.
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.2 |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/35336] Broken diagnostic: 'bit_field_ref' not supported by dump_expr
2008-02-23 19:48 [Bug c++/35336] New: Broken diagnostic: 'bit_field_ref' not supported by dump_expr reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-09-13 1:24 ` reichelt at gcc dot gnu dot org
@ 2008-12-05 17:02 ` jakub at gcc dot gnu dot org
2008-12-05 21:13 ` jakub at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-05 17:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2008-12-05 17:01 -------
Subject: Bug 35336
Author: jakub
Date: Fri Dec 5 16:59:34 2008
New Revision: 142484
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142484
Log:
PR middle-end/37248
* fold-const.c (make_bit_field_ref): Change bitpos and bitsize
arguments to HOST_WIDE_INT. If type has different signedness
than unsignedp or different precision from bitsize, create
the right type for BIT_FIELD_REF and cast to type.
(fold_truthop): Change first_bit and end_bit to HOST_WIDE_INT.
Revert:
2008-03-05 Richard Guenther <rguenther@suse.de>
PR c++/35336
* fold-const.c (fold_truthop): Remove code generating
BIT_FIELD_REFs of structure bases.
(fold_binary): Likewise.
(make_bit_field_ref): Remove.
(optimize_bit_field_compare): Remove.
(all_ones_mask_p): Remove.
* gcc.target/i386/pr37248-1.c: New test.
* gcc.target/i386/pr37248-2.c: New test.
* gcc.target/i386/pr37248-3.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr37248-1.c
trunk/gcc/testsuite/gcc.target/i386/pr37248-2.c
trunk/gcc/testsuite/gcc.target/i386/pr37248-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35336
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/35336] Broken diagnostic: 'bit_field_ref' not supported by dump_expr
2008-02-23 19:48 [Bug c++/35336] New: Broken diagnostic: 'bit_field_ref' not supported by dump_expr reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-12-05 17:02 ` jakub at gcc dot gnu dot org
@ 2008-12-05 21:13 ` jakub at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-12-05 21:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2008-12-05 21:11 -------
Subject: Bug 35336
Author: jakub
Date: Fri Dec 5 21:10:16 2008
New Revision: 142497
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142497
Log:
PR c++/35336
* c-pretty-print.c (pp_c_postfix_expression): Handle BIT_FIELD_REF.
(pp_c_expression): Likewise.
* error.c (dump_expr): Handle BIT_FIELD_REF.
* g++.dg/other/error30.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/other/error30.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-pretty-print.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35336
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-12-05 21:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-23 19:48 [Bug c++/35336] New: Broken diagnostic: 'bit_field_ref' not supported by dump_expr reichelt at gcc dot gnu dot org
2008-03-04 20:00 ` [Bug c++/35336] " rguenth at gcc dot gnu dot org
2008-03-05 10:33 ` rguenth at gcc dot gnu dot org
2008-03-14 16:21 ` rguenth at gcc dot gnu dot org
2008-06-11 11:16 ` rguenth at gcc dot gnu dot org
2008-06-21 20:58 ` reichelt at gcc dot gnu dot org
2008-09-13 1:24 ` reichelt at gcc dot gnu dot org
2008-12-05 17:02 ` jakub at gcc dot gnu dot org
2008-12-05 21:13 ` jakub 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).