[Bug ada/83091] New: ICE with -g in arm-eabi compilation

simon at pushface dot org gcc-bugzilla@gcc.gnu.org
Tue Nov 21 16:32:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83091

            Bug ID: 83091
           Summary: ICE with -g in arm-eabi compilation
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simon at pushface dot org
  Target Milestone: ---
              Host: x86_64-apple-darwin15
            Target: arm-eabi

Created attachment 42671
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42671&action=edit
Demonstrator

This build (with -g) fails. No problem without -g.

$ arm-eabi-gnatmake --RTS=. -c -u -f stm32-timers.adb -cargs -mlittle-endian
-mhard-float -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -g
arm-eabi-gcc -c --RTS=. -mlittle-endian -mhard-float -mcpu=cortex-m4
-mfpu=fpv4-sp-d16 -mthumb -g stm32-timers.adb
stm32-timers.adb:1538:1: error: type variant differs by TYPE_MODE.
 <record_type 0x1460e53f0 stm32__timers__timx_ccer___XP4 packed type_1 HI
    size <integer_cst 0x144811000 type <integer_type 0x14480d0a8 bitsizetype>
constant visited 16>
    unit-size <integer_cst 0x144811018 type <integer_type 0x14480d000 sizetype>
constant visited 2>
    align:16 warn_if_not_align:0 symtab:0 alias-set 23 canonical-type
0x1460e53f0
    fields <field_decl 0x1460e44c0 OBJECT
        type <integer_type 0x1460e52a0 stm32__timers__timx_ccer___XP4 type
<integer_type 0x1460e5348 system__unsigned_types__short_unsigned>
            sizes-gimplified asm_written public visited unsigned type_0 type_5
HI size <integer_cst 0x144811000 16> unit-size <integer_cst 0x144811018 2>
            align:16 warn_if_not_align:0 symtab:0 alias-set 23 canonical-type
0x1460e52a0 precision:16 min <integer_cst 0x1460e0078 0> max <integer_cst
0x1460b7de0 65535> context <translation_unit_decl 0x144920000 stm32-timers.adb>
            actual bounds <tree_list 0x1460e2410 value <enumeral_type
0x1460a79d8 stm32__timers__timer_channel>> RM size <integer_cst 0x144811000 16>
RM min <integer_cst 0x1460e00a8 0> RM max <integer_cst 0x1460e0090 65535>
            chain <type_decl 0x1460e4428 stm32__timers__timx_ccer___XP4>>
        unsigned packed nonaddressable HI stm32-timers.ads:1390:9 size
<integer_cst 0x144811000 16> unit-size <integer_cst 0x144811018 2>
        align:16 warn_if_not_align:0 offset_align 64
        offset <integer_cst 0x144801e28 constant visited 0>
        bit-offset <integer_cst 0x144801e88 constant 0> bit_field_type
<integer_type 0x1460e52a0 stm32__timers__timx_ccer___XP4> context <record_type
0x1460e53f0 stm32__timers__timx_ccer___XP4>> context <translation_unit_decl
0x144920000 stm32-timers.adb> Ada size <integer_cst 0x144811000 16>
    chain <type_decl 0x1460e4558 stm32__timers__timx_ccer___XP4___JM>>
 <record_type 0x1460e5498 stm32__timers__timx_ccer___XP4 atomic
sizes-gimplified volatile visited packed type_1 type_2 BLK
    size <integer_cst 0x144811000 type <integer_type 0x14480d0a8 bitsizetype>
constant visited 16>
    unit-size <integer_cst 0x144811018 type <integer_type 0x14480d000 sizetype>
constant visited 2>
    align:16 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x1460e5498
    fields <field_decl 0x1460e44c0 OBJECT
        type <integer_type 0x1460e52a0 stm32__timers__timx_ccer___XP4 type
<integer_type 0x1460e5348 system__unsigned_types__short_unsigned>
            sizes-gimplified asm_written public visited unsigned type_0 type_5
HI size <integer_cst 0x144811000 16> unit-size <integer_cst 0x144811018 2>
            align:16 warn_if_not_align:0 symtab:0 alias-set 23 canonical-type
0x1460e52a0 precision:16 min <integer_cst 0x1460e0078 0> max <integer_cst
0x1460b7de0 65535> context <translation_unit_decl 0x144920000 stm32-timers.adb>
            actual bounds <tree_list 0x1460e2410 value <enumeral_type
0x1460a79d8 stm32__timers__timer_channel>> RM size <integer_cst 0x144811000 16>
RM min <integer_cst 0x1460e00a8 0> RM max <integer_cst 0x1460e0090 65535>
            chain <type_decl 0x1460e4428 stm32__timers__timx_ccer___XP4>>
        unsigned packed nonaddressable HI stm32-timers.ads:1390:9 size
<integer_cst 0x144811000 16> unit-size <integer_cst 0x144811018 2>
        align:16 warn_if_not_align:0 offset_align 64
        offset <integer_cst 0x144801e28 constant visited 0>
        bit-offset <integer_cst 0x144801e88 constant 0> bit_field_type
<integer_type 0x1460e52a0 stm32__timers__timx_ccer___XP4> context <record_type
0x1460e53f0 stm32__timers__timx_ccer___XP4>> context <translation_unit_decl
0x144920000 stm32-timers.adb> Ada size <integer_cst 0x144811000 16>
    pointer_to_this <pointer_type 0x14614a540> chain <type_decl 0x1460e45f0
stm32__timers__timx_ccer___XP4>>
+===========================GNAT BUG DETECTED==============================+
| 8.0.0 20171102 (experimental) (arm-eabi) verify_type failed              |
| Error detected around stm32-timers.adb:1538:1                            |
| Please submit a bug report; see https://gcc.gnu.org/bugs/ .              |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact command that you entered.                              |
| Also include sources listed below.                                       |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

system.ads
stm32-timers.adb
stm32-timers.ads
stm32.ads
interfac.ads
hal.ads
stm32_svd.ads
s-unstyp.ads
a-except.ads
ada.ads


raised TYPES.UNRECOVERABLE_ERROR : comperr.adb:407


More information about the Gcc-bugs mailing list