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

--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Martin Liška from comment #1)
> Interesting, let me try to reproduce that. Note that using -O3 can't be
> problem as it's supposed to do only valid code transformations.

Indeed. O3 isn't the problem. Only -O2 and ada required. Here is a stack
backtrace for more detail.

==27827==ERROR: AddressSanitizer: dynamic-stack-buffer-overflow on address
0x7fffabf0ac47 at pc 0x000001b9656c bp 0x7fffabf0a530 sp 0x7fffabf0a528
READ of size 1 at 0x7fffabf0ac47 thread T0
    #0 0x1b9656b in switch__c__scan_front_end_switches
../../trunk/gcc/ada/switch-c.adb:302
    #1 0x1bd3446 in back_end__scan_compiler_arguments
../../trunk/gcc/ada/back_end.adb:387
    #2 0x1bd3da4 in _ada_gnat1drv ../../trunk/gcc/ada/gnat1drv.adb:1049
    #3 0x13e572d in gnat_parse_file
../../trunk/gcc/ada/gcc-interface/misc.c:119

Line 302 is 

           C := Switch_Chars (Ptr);

Reply via email to