[stage1][PATCH] Add gcc_assert that &global_options are not dirty modified.

Martin Liška mliska@suse.cz
Thu Jun 18 12:21:01 GMT 2020


On 6/18/20 1:32 PM, Luis Machado wrote:
> FTR, I'm running into this ICE when attempting to build the Linux Kernel for arm64.

Hello.

Thanks for the report.

> 
> More specifically:
> 
> /repos/linux-arm/kernel/bpf/core.c:1368:1: internal compiler error: ‘global_options’ are modified in local context
>   1368 | {
>        | ^
> 0xc0554b cl_optimization_compare(gcc_options*, gcc_options*)
>          /build/gcc-master/gcc/options-save.c:9786
> 0x7812df handle_optimize_attribute
>          ../../../repos/gcc/gcc/c-family/c-attribs.c:4475
> 0x666477 decl_attributes(tree_node**, tree_node*, int, tree_node*)
>          ../../../repos/gcc/gcc/attribs.c:714
> 0x688c9b start_function(c_declspecs*, c_declarator*, tree_node*)
>          ../../../repos/gcc/gcc/c/c-decl.c:9177
> 0x6f85f3 c_parser_declaration_or_fndef
>          ../../../repos/gcc/gcc/c/c-parser.c:2434
> 0x7038af c_parser_external_declaration
>          ../../../repos/gcc/gcc/c/c-parser.c:1773
> 0x7044c7 c_parser_translation_unit
>          ../../../repos/gcc/gcc/c/c-parser.c:1646
> 0x7044c7 c_parse_file()
>          ../../../repos/gcc/gcc/c/c-parser.c:21822
> 0x764897 c_common_parse_file()
>          ../../../repos/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.
> 
> I don't have a reduced testcase for this, but I thought I'd check if this is known/being worked on before filing a bug.

It's not a known issue. Please attach me the used command line and pre-processed source file
(using -E option).

Martin

> 
> On 6/9/20 6:01 PM, Jeff Law via Gcc-patches wrote:
>> On Thu, 2020-05-21 at 14:04 +0200, Martin Liška wrote:
>>> PING^1
>>>
>>> On 3/20/20 4:55 PM, Martin Liška wrote:
>>>> Ok, it would be possible, but if you take a look at options-save.c there's no
>>>> function that will leverage that. It's a generated code so I guess we can
>>>> live with that?
>> Given the size increase is under control now, I think this is fine for the trunk.
>>
>> jeff
>>



More information about the Gcc-patches mailing list