On 6/18/20 12:40 PM, Martin Liška wrote:
I see the following ICE for aarch64 kernel build:
$ cat neon.i
#pragma GCC push_options
#pragma GCC target "arch=armv8.2-a+bf16"
#pragma GCC pop_options
$ ./xgcc -B. ~/Programming/testcases/neon.i -c -mbranch-protection=pac-ret
/home/marxin/Programming/testcases/neon.i:3:9: internal compiler error:
‘global_options’ are modified in local context
3 | #pragma GCC pop_options
| ^~~
0x1111f73 cl_optimization_compare(gcc_options*, gcc_options*)
/dev/shm/objdir3/gcc/options-save.c:11996
0xb02ff4 handle_pragma_pop_options
/home/marxin/Programming/gcc/gcc/c-family/c-pragma.c:1090
0xb03953 c_invoke_pragma_handler(unsigned int)
/home/marxin/Programming/gcc/gcc/c-family/c-pragma.c:1512
0xa5ae39 c_parser_pragma
/home/marxin/Programming/gcc/gcc/c/c-parser.c:12544
0xa3f9fc c_parser_external_declaration
/home/marxin/Programming/gcc/gcc/c/c-parser.c:1754
0xa3f5c8 c_parser_translation_unit
/home/marxin/Programming/gcc/gcc/c/c-parser.c:1646
0xa7db4d c_parse_file()
/home/marxin/Programming/gcc/gcc/c/c-parser.c:21822
0xafd0b6 c_common_parse_file()
/home/marxin/Programming/gcc/gcc/c-family/c-opts.c:1190
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
#1 0x0000000001111f74 in cl_optimization_compare (ptr1=0x2d5e3f0,
ptr2=0x2cc7760 <global_options>) at options-save.c:11996
11996 internal_error ("%<global_options%> are modified in local
context");
(gdb) p ptr2->x_aarch64_branch_protection_string
$2 = 0x2cf52e0 "pac-ret"
(gdb) p ptr1->x_aarch64_branch_protection_string
$3 = 0x2d3c190 "pac-ret"
│11995 if (ptr1->x_aarch64_branch_protection_string !=
ptr2->x_aarch64_branch_protection_string)
>│11996 internal_error ("%<global_options%> are modified in
local context");
This is bogus as these are 2 strings that are equal. Let me fix it.
Martin
That's another one I noticed alongside the first one I reported. That's
good that you managed to reproduce it.