This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42217] [4.5 Regression] ICE with zero-length bit-field
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Nov 2009 15:45:15 -0000
- Subject: [Bug c++/42217] [4.5 Regression] ICE with zero-length bit-field
- References: <bug-42217-1771@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-11-29 15:45 -------
Confirmed.
C++ issue. It calls convert_to_integer with
#9 0x082b3dd6 in ocp_convert (type=0xb7d48ba0, expr=0xb7cac5b8, convtype=15,
flags=35) at /home/richard/src/trunk/gcc/cp/cvt.c:700
700 return fold_if_not_in_template (convert_to_integer (type, e));
(gdb) p e
$1 = (tree) 0xb7cac5b8
(gdb) call debug_tree ($1)
<integer_cst 0xb7cac5b8 type <integer_type 0xb7cc02a0 int> constant 0>
(gdb) p type
$2 = (tree) 0xb7d48ba0
(gdb) call debug_tree ($2)
<integer_type 0xb7d48ba0 QI
size <integer_cst 0xb7cac138 type <integer_type 0xb7cc0060 bit_size_type>
constant 8>
unit size <integer_cst 0xb7cac150 type <integer_type 0xb7cc0000 unsigned
int> constant 1>
align 8 symtab 0 alias set -1 canonical type 0xb7d48ba0 precision 0 min
<integer_cst 0xb7d425b8 -2147483648> max <integer_cst 0xb7d42b88 2147483647>>
thus an integer type with TYPE_PRECISION zero. That's invalid.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|middle-end |c++
Ever Confirmed|0 |1
Priority|P3 |P1
Last reconfirmed|0000-00-00 00:00:00 |2009-11-29 15:45:15
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42217