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

--- Comment #2 from Anonymous <iamanonymous.cs at gmail dot com> ---
# gcc helper.i -O2 -fno-omit-frame-pointer -fno-stack-protector
-fno-strict-aliasing -g3 -Wall -Wextra -Werror -Wno-pointer-arith
-Wno-missing-field-initializers -pedantic -DDEBUG -c -o helper.o
helper.i:1:17: error: file-scope declaration of ‘env’ specifies ‘register’
[-Werror=pedantic]
    1 | register struct str *env asm("ebp");
      |                 ^~~
helper.i: In function ‘fun’:
helper.i:5:12: error: frame pointer required, but reserved
    5 | extern int fun (int base)
      |            ^~~
helper.i:1:22: note: for ‘env’
    1 | register struct str *env asm("ebp");
      |                      ^~~
during RTL pass: pro_and_epilogue
helper.i:8:1: internal compiler error: Segmentation fault
    8 | }
      | ^
0x10a70ff crash_signal
        /root/gdbtest/gcc/obj/../gcc/gcc/toplev.cc:319
0x148922d ix86_finalize_stack_frame_flags
        /root/gdbtest/gcc/obj/../gcc/gcc/config/i386/i386.cc:8606
0x148a70c ix86_expand_prologue()
        /root/gdbtest/gcc/obj/../gcc/gcc/config/i386/i386.cc:8777
0x1a6c0aa gen_prologue()
        /root/gdbtest/gcc/obj/../gcc/gcc/config/i386/i386.md:19176
0x1475135 target_gen_prologue
        /root/gdbtest/gcc/obj/../gcc/gcc/config/i386/i386.md:27088
0xcf6da7 make_prologue_seq
        /root/gdbtest/gcc/obj/../gcc/gcc/function.cc:5818
0xcf6f63 thread_prologue_and_epilogue_insns()
        /root/gdbtest/gcc/obj/../gcc/gcc/function.cc:6053
0xcf76d2 rest_of_handle_thread_prologue_and_epilogue
        /root/gdbtest/gcc/obj/../gcc/gcc/function.cc:6567
0xcf76d2 execute
        /root/gdbtest/gcc/obj/../gcc/gcc/function.cc:6653
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to