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

--- Comment #55 from Óscar Fuentes <gcc_bugzilla at axeitado dot com> ---
Here we go (this is a debug build):

$
/d/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32/./prev-gcc/xgcc
-B/d/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32/./prev-gcc/
-B/mingw32/i686-w64-mingw32/bin/ -L/mingw32/i686-w64-mingw32/lib -L/mingw32/lib
-isystem /mingw32/i686-w64-mingw32/include -isystem /mingw32/include
-B/mingw32/i686-w64-mingw32/bin/ -B/mingw32/i686-w64-mingw32/lib/ -isystem
/mingw32/i686-w64-mingw32/include -isystem
/mingw32/i686-w64-mingw32/sys-include   -fno-checking -c -g -O2
-D__USE_MINGW_ACCESS -Wno-pedantic-ms-format -fno-checking -gtoggle  -gnatpg 
-W -Wall -g -O1 -fno-inline  -nostdinc -I- -I. -Iada/generated -Iada
-Iada/gcc-interface -I../../gcc-11.2.0/gcc/ada
-I../../gcc-11.2.0/gcc/ada/gcc-interface -Iada/libgnat
-I../../gcc-11.2.0/gcc/ada/libgnat
../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb -o ada/libgnat/a-except.o
-wrapper gdb,--args
GNU gdb (GDB) 10.2
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "i686-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from
D:/dev/other/MINGW-packages/mingw-w64-gcc/src/build-i686-w64-mingw32/prev-gcc/gnat1.exe...
Breakpoint 1 at 0x1b9b938: file ../../gcc-11.2.0/gcc/diagnostic.c, line 1884.
Breakpoint 2 at 0x1b9b79f: file ../../gcc-11.2.0/gcc/diagnostic.c, line 1804.
Breakpoint 3 at 0x1e3b618
Breakpoint 4 at 0x1e3b5e8
File tree.h will be skipped when stepping.
File is-a.h will be skipped when stepping.
File line-map.h will be skipped when stepping.
File timevar.h will be skipped when stepping.
Function rtx_expr_list::next will be skipped when stepping.
Function rtx_expr_list::element will be skipped when stepping.
Function rtx_insn_list::next will be skipped when stepping.
Function rtx_insn_list::insn will be skipped when stepping.
Function rtx_sequence::len will be skipped when stepping.
Function rtx_sequence::element will be skipped when stepping.
Function rtx_sequence::insn will be skipped when stepping.
Function INSN_UID will be skipped when stepping.
Function PREV_INSN will be skipped when stepping.
Function SET_PREV_INSN will be skipped when stepping.
Function NEXT_INSN will be skipped when stepping.
Function SET_NEXT_INSN will be skipped when stepping.
Function BLOCK_FOR_INSN will be skipped when stepping.
Function PATTERN will be skipped when stepping.
Function INSN_LOCATION will be skipped when stepping.
Function INSN_HAS_LOCATION will be skipped when stepping.
Function JUMP_LABEL_AS_INSN will be skipped when stepping.
Successfully loaded GDB hooks for GCC
(gdb) catch exception
Catchpoint 5: all Ada exceptions
(gdb) run
Starting program:
D:\dev\other\MINGW-packages\mingw-w64-gcc\src\build-i686-w64-mingw32\prev-gcc\gnat1.exe
-I - -I . -I ada/generated -I ada -I ada/gcc-interface -I
../../gcc-11.2.0/gcc/ada -I ../../gcc-11.2.0/gcc/ada/gcc-interface -I
ada/libgnat -I ../../gcc-11.2.0/gcc/ada/libgnat -gnatwa -quiet -nostdinc -O2
-O1 -Wno-pedantic-ms-format -Wextra -Wall -dumpdir ada/libgnat/ -dumpbase
a-except.adb -dumpbase-ext .adb -g -fno-checking -gtoggle -gnatpg -g
-fno-inline "-mtune=generic" "-march=i686" -gnatO ada/libgnat/a-except.o
../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb -o C:\apps\msys64\tmp\ccyhgK0H.s
[New Thread 4320.0x1d80]
[New Thread 4320.0x1d04]
[New Thread 4320.0x2010]
gnat1.exe: warning: command-line option '-Wno-pedantic-ms-format' is valid for
C/C++/ObjC/ObjC++ but not for Ada

Catchpoint 5, SEM_PRAG.ANALYZE_PRAGMA.PRAGMA_EXIT (sem_prag.adb:6605) at
0x007e816c in sem_prag.analyze_pragma.check_valid_library_unit_pragma ()
    at ../../gcc-11.2.0/gcc/ada/sem_prag.adb:6605
6605                      raise Pragma_Exit;
(gdb) bt
#0  <__gnat_debug_raise_exception> (
    e=0x207a990 <sem_prag.analyze_pragma.pragma_exit>, message=...)
    at ../../gcc-11.2.0/gcc/ada/libgnat/s-excdeb.adb:40
#1  0x0048e862 in ada.exceptions.complete_occurrence (x=x@entry=0x132d8ac0)
    at ../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb:912
#2  0x0048e878 in ada.exceptions.complete_and_propagate_occurrence (
    x=x@entry=0x132d8ac0) at ../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb:923
#3  0x0048e8b3 in <__gnat_raise_exception> (
    e=0x207a990 <sem_prag.analyze_pragma.pragma_exit>, message=...)
    at ../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb:960
#4  0x007e816c in sem_prag.analyze_pragma.check_valid_library_unit_pragma ()
    at ../../gcc-11.2.0/gcc/ada/sem_prag.adb:6605
#5  0x007deae3 in sem_prag.analyze_pragma (n=33616)
    at ../../gcc-11.2.0/gcc/ada/sem_prag.adb:21911
#6  0x006a1445 in sem.analyze (n=33616)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:465
#7  0x007186da in sem_ch3.analyze_declarations (l=-99996169)
    at ../../gcc-11.2.0/gcc/ada/sem_ch3.adb:2655
#8  0x00770b7d in sem_ch7.analyze_package_specification (n=33606)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:1582
#9  0x006a1425 in sem.analyze (n=33606)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:459
#10 0x00770856 in sem_ch7.analyze_package_declaration (n=33729)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:1210
#11 0x006a13f5 in sem.analyze (n=33729)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:450
#12 0x006deab8 in sem_ch12.analyze_package_instantiation (n=33272)
    at ../../gcc-11.2.0/gcc/ada/sem_ch12.adb:4773
#13 0x006a1405 in sem.analyze (n=33272)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:453
#14 0x007186da in sem_ch3.analyze_declarations (l=-99996197)
    at ../../gcc-11.2.0/gcc/ada/sem_ch3.adb:2655
#15 0x00770b7d in sem_ch7.analyze_package_specification (n=33260)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:1582
#16 0x006a1425 in sem.analyze (n=33260)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:459
#17 0x00770856 in sem_ch7.analyze_package_declaration (n=33354)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:1210
#18 0x006a13f5 in sem.analyze (n=33354)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:450
#19 0x006cbb45 in sem_ch10.analyze_compilation_unit (n=33243)
    at ../../gcc-11.2.0/gcc/ada/sem_ch10.adb:913
#20 0x006a0e55 in sem.analyze (n=33243)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:180
#21 0x006a24b9 in sem.semantics.do_analyze ()
    at ../../gcc-11.2.0/gcc/ada/sem.adb:1421
#22 0x006a292d in sem.semantics (comp_unit=33243)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:1615
#23 0x00687752 in rtsfind.load_rtu (u_id=system_img_int, id=re_image_integer,
    use_setting=false) at ../../gcc-11.2.0/gcc/ada/rtsfind.adb:1156
#24 0x0068838a in rtsfind.rte (e=re_image_integer)
    at ../../gcc-11.2.0/gcc/ada/rtsfind.adb:1506
#25 0x005bd859 in exp_imgv.expand_image_attribute (n=6229)
    at ../../gcc-11.2.0/gcc/ada/exp_imgv.adb:750
#26 0x0050e140 in exp_attr.expand_n_attribute_reference (n=6229)
    at ../../gcc-11.2.0/gcc/ada/exp_attr.adb:3931
#27 0x005ed275 in expander.expand (n=6229)
    at ../../gcc-11.2.0/gcc/ada/expander.adb:205
#28 0x00802c25 in sem_res.resolve (n=6229, typ=128)
    at ../../gcc-11.2.0/gcc/ada/sem_res.adb:3399
#29 0x0071b2f5 in sem_ch3.analyze_object_declaration (n=6226)
    at ../../gcc-11.2.0/gcc/ada/sem_ch3.adb:4302
#30 0x006a11e5 in sem.analyze (n=6226) at ../../gcc-11.2.0/gcc/ada/sem.adb:351
#31 0x007186da in sem_ch3.analyze_declarations (l=-99999533)
    at ../../gcc-11.2.0/gcc/ada/sem_ch3.adb:2655
#32 0x0075e2ca in sem_ch6.analyze_subprogram_body_helper (n=6217)
    at ../../gcc-11.2.0/gcc/ada/sem_ch6.adb:5156
#33 0x0075c568 in sem_ch6.analyze_subprogram_body (n=6217)
    at ../../gcc-11.2.0/gcc/ada/sem_ch6.adb:2818
#34 0x006a15fd in sem.analyze (n=6217) at ../../gcc-11.2.0/gcc/ada/sem.adb:547
#35 0x007186da in sem_ch3.analyze_declarations (l=-99999978)
    at ../../gcc-11.2.0/gcc/ada/sem_ch3.adb:2655
#36 0x0076f8db in sem_ch7.analyze_package_body_helper (n=2413)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:954
#37 0x0076ee0a in sem_ch7.analyze_package_body (n=2413)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:180
#38 0x006a13d5 in sem.analyze (n=2413) at ../../gcc-11.2.0/gcc/ada/sem.adb:444
#39 0x006cbb45 in sem_ch10.analyze_compilation_unit (n=2335)
    at ../../gcc-11.2.0/gcc/ada/sem_ch10.adb:913
#40 0x006a0e55 in sem.analyze (n=2335) at ../../gcc-11.2.0/gcc/ada/sem.adb:180
#41 0x006a24b9 in sem.semantics.do_analyze ()
    at ../../gcc-11.2.0/gcc/ada/sem.adb:1421
#42 0x006a292d in sem.semantics (comp_unit=2335)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:1615
#43 0x00604842 in frontend () at ../../gcc-11.2.0/gcc/ada/frontend.adb:422
#44 0x0089b6d9 in gnat1drv () at ../../gcc-11.2.0/gcc/ada/gnat1drv.adb:1237
#45 0x004243d4 in gnat_parse_file ()
    at ../../gcc-11.2.0/gcc/ada/gcc-interface/misc.c:118
#46 0x00d994a8 in compile_file () at ../../gcc-11.2.0/gcc/toplev.c:457
#47 0x00d9c382 in do_compile () at ../../gcc-11.2.0/gcc/toplev.c:2201
#48 0x00d9c66f in toplev::main (this=0x1070febe, argc=46, argv=0x12e11e40)
    at ../../gcc-11.2.0/gcc/toplev.c:2340
#49 0x01b7a6ab in main (argc=46, argv=0x12e11e40)
    at ../../gcc-11.2.0/gcc/main.c:39
(gdb) c
Continuing.

Thread 1 hit Breakpoint 4, 0x773bb68b in msvcrt!abort ()
   from C:\WINDOWS\SysWOW64\msvcrt.dll
(gdb) bt
#0  0x773bb68b in msvcrt!abort () from C:\WINDOWS\SysWOW64\msvcrt.dll
#1  0x02074f7d in uw_init_context_1 (context=context@entry=0x1070c890,
    outer_cfa=outer_cfa@entry=0x1070ca70,
    outer_ra=0x406f8a <__gnat_Unwind_RaiseException(_Unwind_Exception*)+17>)
    at ../../../gcc-10.3.0/libgcc/unwind-dw2.c:1593
#2  0x01e2ba3d in _Unwind_RaiseException (exc=0x132d8a90)
    at ../../../gcc-10.3.0/libgcc/unwind.inc:93
#3  0x00406f8a in __gnat_Unwind_RaiseException (e=e@entry=0x132d8a90)
    at ../../gcc-11.2.0/gcc/ada/raise-gcc.c:1391
#4  0x0048e3b3 in ada.exceptions.exception_propagation.propagate_gcc_exception
    (gcc_exception=0x132d8a90)
    at ../../gcc-11.2.0/gcc/ada/libgnat/a-exexpr.adb:597
#5  0x0048e402 in ada.exceptions.exception_propagation.propagate_exception (
    excep=...) at ../../gcc-11.2.0/gcc/ada/libgnat/a-exexpr.adb:628
#6  0x0048e880 in ada.exceptions.complete_and_propagate_occurrence (
    x=x@entry=0x132d8ac0) at ../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb:924
#7  0x0048e8b3 in <__gnat_raise_exception> (
    e=0x207a990 <sem_prag.analyze_pragma.pragma_exit>, message=...)
    at ../../gcc-11.2.0/gcc/ada/libgnat/a-except.adb:960
#8  0x007e816c in sem_prag.analyze_pragma.check_valid_library_unit_pragma ()
    at ../../gcc-11.2.0/gcc/ada/sem_prag.adb:6605
#9  0x007deae3 in sem_prag.analyze_pragma (n=33616)
    at ../../gcc-11.2.0/gcc/ada/sem_prag.adb:21911
#10 0x006a1445 in sem.analyze (n=33616)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:465
#11 0x007186da in sem_ch3.analyze_declarations (l=-99996169)
    at ../../gcc-11.2.0/gcc/ada/sem_ch3.adb:2655
#12 0x00770b7d in sem_ch7.analyze_package_specification (n=33606)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:1582
#13 0x006a1425 in sem.analyze (n=33606)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:459
#14 0x00770856 in sem_ch7.analyze_package_declaration (n=33729)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:1210
#15 0x006a13f5 in sem.analyze (n=33729)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:450
#16 0x006deab8 in sem_ch12.analyze_package_instantiation (n=33272)
    at ../../gcc-11.2.0/gcc/ada/sem_ch12.adb:4773
#17 0x006a1405 in sem.analyze (n=33272)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:453
#18 0x007186da in sem_ch3.analyze_declarations (l=-99996197)
    at ../../gcc-11.2.0/gcc/ada/sem_ch3.adb:2655
#19 0x00770b7d in sem_ch7.analyze_package_specification (n=33260)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:1582
#20 0x006a1425 in sem.analyze (n=33260)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:459
#21 0x00770856 in sem_ch7.analyze_package_declaration (n=33354)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:1210
#22 0x006a13f5 in sem.analyze (n=33354)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:450
#23 0x006cbb45 in sem_ch10.analyze_compilation_unit (n=33243)
    at ../../gcc-11.2.0/gcc/ada/sem_ch10.adb:913
#24 0x006a0e55 in sem.analyze (n=33243)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:180
#25 0x006a24b9 in sem.semantics.do_analyze ()
    at ../../gcc-11.2.0/gcc/ada/sem.adb:1421
#26 0x006a292d in sem.semantics (comp_unit=33243)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:1615
#27 0x00687752 in rtsfind.load_rtu (u_id=system_img_int, id=re_image_integer,
    use_setting=false) at ../../gcc-11.2.0/gcc/ada/rtsfind.adb:1156
#28 0x0068838a in rtsfind.rte (e=re_image_integer)
    at ../../gcc-11.2.0/gcc/ada/rtsfind.adb:1506
#29 0x005bd859 in exp_imgv.expand_image_attribute (n=6229)
    at ../../gcc-11.2.0/gcc/ada/exp_imgv.adb:750
#30 0x0050e140 in exp_attr.expand_n_attribute_reference (n=6229)
    at ../../gcc-11.2.0/gcc/ada/exp_attr.adb:3931
#31 0x005ed275 in expander.expand (n=6229)
    at ../../gcc-11.2.0/gcc/ada/expander.adb:205
#32 0x00802c25 in sem_res.resolve (n=6229, typ=128)
    at ../../gcc-11.2.0/gcc/ada/sem_res.adb:3399
#33 0x0071b2f5 in sem_ch3.analyze_object_declaration (n=6226)
    at ../../gcc-11.2.0/gcc/ada/sem_ch3.adb:4302
#34 0x006a11e5 in sem.analyze (n=6226) at ../../gcc-11.2.0/gcc/ada/sem.adb:351
#35 0x007186da in sem_ch3.analyze_declarations (l=-99999533)
    at ../../gcc-11.2.0/gcc/ada/sem_ch3.adb:2655
#36 0x0075e2ca in sem_ch6.analyze_subprogram_body_helper (n=6217)
    at ../../gcc-11.2.0/gcc/ada/sem_ch6.adb:5156
#37 0x0075c568 in sem_ch6.analyze_subprogram_body (n=6217)
    at ../../gcc-11.2.0/gcc/ada/sem_ch6.adb:2818
#38 0x006a15fd in sem.analyze (n=6217) at ../../gcc-11.2.0/gcc/ada/sem.adb:547
#39 0x007186da in sem_ch3.analyze_declarations (l=-99999978)
    at ../../gcc-11.2.0/gcc/ada/sem_ch3.adb:2655
#40 0x0076f8db in sem_ch7.analyze_package_body_helper (n=2413)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:954
#41 0x0076ee0a in sem_ch7.analyze_package_body (n=2413)
    at ../../gcc-11.2.0/gcc/ada/sem_ch7.adb:180
#42 0x006a13d5 in sem.analyze (n=2413) at ../../gcc-11.2.0/gcc/ada/sem.adb:444
#43 0x006cbb45 in sem_ch10.analyze_compilation_unit (n=2335)
    at ../../gcc-11.2.0/gcc/ada/sem_ch10.adb:913
#44 0x006a0e55 in sem.analyze (n=2335) at ../../gcc-11.2.0/gcc/ada/sem.adb:180
#45 0x006a24b9 in sem.semantics.do_analyze ()
    at ../../gcc-11.2.0/gcc/ada/sem.adb:1421
#46 0x006a292d in sem.semantics (comp_unit=2335)
    at ../../gcc-11.2.0/gcc/ada/sem.adb:1615
#47 0x00604842 in frontend () at ../../gcc-11.2.0/gcc/ada/frontend.adb:422
#48 0x0089b6d9 in gnat1drv () at ../../gcc-11.2.0/gcc/ada/gnat1drv.adb:1237
#49 0x004243d4 in gnat_parse_file ()
    at ../../gcc-11.2.0/gcc/ada/gcc-interface/misc.c:118
#50 0x00d994a8 in compile_file () at ../../gcc-11.2.0/gcc/toplev.c:457
#51 0x00d9c382 in do_compile () at ../../gcc-11.2.0/gcc/toplev.c:2201
#52 0x00d9c66f in toplev::main (this=0x1070febe, argc=46, argv=0x12e11e40)
    at ../../gcc-11.2.0/gcc/toplev.c:2340
#53 0x01b7a6ab in main (argc=46, argv=0x12e11e40)
    at ../../gcc-11.2.0/gcc/main.c:39
(gdb)

Reply via email to