https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72740
Bug ID: 72740 Summary: gnat.dg/specs/access[12].ads ICE when compiling with -g Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- /home/abuild/rguenther/obj-early-lto-debug-g/gcc/gnat1 -I /space/rguenther/src/svn/early-lto-debug/gcc/testsuite/gnat.dg/specs/ -I - -quiet -dumpbase access2.ads -auxbase access2 -gnatez -fdiagnostics-color=never -gnatea -fRTS=/home/abuild/rguenther/obj-early-lto-debug-g/x86_64-pc-linux-gnu/./libada -fno-diagnostics-show-caret -g -gnatez -mtune=generic -march=x86-64 /space/rguenther/src/svn/early-lto-debug/gcc/testsuite/gnat.dg/specs/access2.ads -o access2.s raised STORAGE_ERROR : stack overflow or erroneous memory access gnatmake: "/space/rguenther/src/svn/early-lto-debug/gcc/testsuite/gnat.dg/specs/access2.ads" compilation error the issue is that we have recursive pointer types and blow the stack when dwarf2out calls verify_type which calls variably_modified_type_p: (gdb) p type->typed.type->typed.type $3 = <pointer_type 0x7ffff6525a80 access2__inc> (gdb) p type->typed.type->typed.type->typed.type $4 = <pointer_type 0x7ffff6525888 access2__priv> (gdb) p type->typed.type->typed.type->typed.type->typed.type $5 = <pointer_type 0x7ffff6525a80 access2__inc> not sure how to best represent such a structure. Maybe variably_modified_type_p needs adjustment?