This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
G++: division by zero in store_split_bit_field
- To: gcc-bugs at gcc dot gnu dot org
- Subject: G++: division by zero in store_split_bit_field
- From: Philip Blundell <Philip dot Blundell at pobox dot com>
- Date: Sat, 01 Jan 2000 16:06:27 +0000
The appended testcase causes G++ 2.95.2 (arm-linux) to crash in
store_split_bit_field when compiling with -O2. The immediate cause is
apparently that get_inner_reference determines that a tree requires 1-bit
(and hence 0-byte) alignment. Since I don't know my way around the C++ front
end at all I haven't had much luck working out where this originates.
The offending tree is this:
<var_decl 0x8575a0c the_arena_controller
type <record_type 0x857534c ArenaController allocated from permanent_obstack
addressable permanent needs-constructing type_1 type_2 type_4 type_5 BLK
size <integer_cst 0x85a41c4 constant permanent 736>
align 32 symtab 0 alias set -1
fields <field_decl 0x8584220 started type <boolean_type 0x82990ec bool>
allocated from permanent_obstack
unsigned permanent nonlocal decl_3 QI file ArenaController.h line 44
size <integer_cst 0x8296788 constant permanent 8>
align 8
bitpos <integer_cst 0x829923c constant permanent 0> context <record_type 0x857534c ArenaController> arguments <integer_cst 0x829923c 0> chain <field_decl 0x85842f8 realtime>>
needs-constructor needs-destructor ~X() X() X(constX&) this=(X&) n_parents 0 use_template=0 interface-unknown
member-functions <tree_vec 0x85a4064 allocated from permanent_obstack
permanent
elt 0 <overload 0x85a40c4>
elt 1 <function_decl 0x859b300 ArenaController>
elt 2 <function_decl 0x858372c start_realtime_arena>
elt 3 <function_decl 0x85838e0 start_replay_arena>
elt 4 <function_decl 0x8583a8c close_arena>
elt 5 <function_decl 0x8583cb4 get_the_arena>
elt 6 <function_decl 0x8583edc is_started>
elt 7 <function_decl 0x8584080 is_realtime>
elt 8 <function_decl 0x85a3f10 __as>>
pointer_to_this <pointer_type 0x85753f8> reference_to_this <reference_type 0x85a3d60> chain <type_decl 0x8575498 ArenaController>>
allocated from permanent_obstack
used permanent public external decl_2 VOID file ArenaBase.h line 49
align 1
(mem/s (symbol_ref:SI ("the_arena_controller")) 0) chain <type_decl 0x857591c ArenaReplay>>
Thanks for any help.
p.
ArenaBase.ii.gz