This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/77773] [6/7 Regression] Segfault when compiling __simd64_float16_t using arm-none-eabi-g++ with debug information
- From: "aldyh at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 26 Oct 2016 19:10:16 +0000
- Subject: [Bug debug/77773] [6/7 Regression] Segfault when compiling __simd64_float16_t using arm-none-eabi-g++ with debug information
- Auto-submitted: auto-generated
- References: <bug-77773-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77773
--- Comment #5 from Aldy Hernandez <aldyh at gcc dot gnu.org> ---
simple_type_specificer() is dereferencing a NULL result from
c_common_type_for_mode and segfaulting:
int prec = TYPE_PRECISION (t);
if (ALL_FIXED_POINT_MODE_P (TYPE_MODE (t)))
t = c_common_type_for_mode (TYPE_MODE (t), TYPE_SATURATING (t));
else
t = c_common_type_for_mode (TYPE_MODE (t), TYPE_UNSIGNED (t));
if (TYPE_NAME (t))
The type in question is:
<real_type 0x7fffefdeb150 HF
size <integer_cst 0x7fffefd002a0 type <integer_type 0x7fffefcf0150
bitsizetype> constant 16>
unit size <integer_cst 0x7fffefd002b8 type <integer_type 0x7fffefcf00a8
sizetype> constant 2>
align 16 symtab 0 alias set -1 canonical type 0x7fffefdeb150 precision 16
pointer_to_this <pointer_type 0x7fffefeab7e0>>
which corresponds to HFmode, which AFAICT does not have a type by design.
The attached patch fixes the problem.