public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Martin Liška" <mliska@suse.cz>
To: law@redhat.com, Luis Machado <luis.machado@linaro.org>,
	Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org, Jan Hubicka <hubicka@ucw.cz>
Subject: Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified.
Date: Thu, 18 Jun 2020 17:36:39 +0200	[thread overview]
Message-ID: <500f2f59-687c-13b1-c003-2570abd2177c@suse.cz> (raw)
In-Reply-To: <68b7b18c8d60fdc5b999a35fdf727b650810cf09.camel@redhat.com>

On 6/18/20 5:02 PM, Jeff Law wrote:
> On Thu, 2020-06-18 at 14:21 +0200, Martin Liška wrote:
>> 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).
> You might try arc-elf gcc.dg/pr91734.c.  I've been behind and just peeked at the
> arc-elf regressions in the tester a moment ago and it's tripping this as well.

Thanks for it. This one is one another example where an optimization level affects
a target option:

$ cat x.c
__attribute__((optimize ("O3"))) void
f1 ()
{
}

int
main ()
{
   return 0;
}

11682	  if (ptr1->x_TARGET_ALIGN_CALL != ptr2->x_TARGET_ALIGN_CALL)
11683	    internal_error ("%<global_options%> are modified in local context");

set here:
     { OPT_LEVELS_3_PLUS_SPEED_ONLY, OPT_malign_call, NULL, 1 },

I'm going to add this to exception list.


> 
> Executing on host: /home/jenkins/workspace/arc-elf/arc-elf-obj/gcc/gcc/xgcc -B/home/jenkins/workspace/arc-elf/arc-elf-obj/gcc/gcc/ /home/jenkins/gcc/gcc/testsuite/gcc.dg/pr91734.c gcc_tg.o    -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never  -fdiagnostics-urls=never   -ansi -pedantic-errors -O2 -std=gnu99     -Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -lm  -o ./pr91734.exe    (timeout = 300)
> spawn -ignore SIGHUP /home/jenkins/workspace/arc-elf/arc-elf-obj/gcc/gcc/xgcc -B/home/jenkins/workspace/arc-elf/arc-elf-obj/gcc/gcc/ /home/jenkins/gcc/gcc/testsuite/gcc.dg/pr91734.c gcc_tg.o -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -fdiagnostics-urls=never -ansi -pedantic-errors -O2 -std=gnu99 -Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -lm -o ./pr91734.exe^M
> /home/jenkins/gcc/gcc/testsuite/gcc.dg/pr91734.c:8:1: internal compiler error: 'global_options' are modified in local context^M
> 0xc8590f cl_optimization_compare(gcc_options*, gcc_options*)^M
>          /home/jenkins/workspace/arc-elf/arc-elf-obj/gcc/gcc/options-save.c:9479^M
> 0x870808 handle_optimize_attribute^M
>          ../../../../../gcc/gcc/c-family/c-attribs.c:4475^M
> 0x784d3f decl_attributes(tree_node**, tree_node*, int, tree_node*)^M
>          ../../../../../gcc/gcc/attribs.c:714^M
> 0x7a0b90 start_function(c_declspecs*, c_declarator*, tree_node*)^M
>          ../../../../../gcc/gcc/c/c-decl.c:9177^M
> 0x7f97f7 c_parser_declaration_or_fndef^M
>          ../../../../../gcc/gcc/c/c-parser.c:2434^M
> 0x801e33 c_parser_external_declaration^M
>          ../../../../../gcc/gcc/c/c-parser.c:1773^M
> 0x802881 c_parser_translation_unit^M
>          ../../../../../gcc/gcc/c/c-parser.c:1646^M
> 0x802881 c_parse_file()^M
>          ../../../../../gcc/gcc/c/c-parser.c:21822^M
> 0x85ab6b c_common_parse_file()^M
>          ../../../../../gcc/gcc/c-family/c-opts.c:1190^M
>>
> 


  reply	other threads:[~2020-06-18 15:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19  8:56 Martin Liška
2020-03-19  9:09 ` Jakub Jelinek
2020-03-19 15:32   ` Martin Liška
2020-03-19 15:47     ` Jakub Jelinek
2020-03-19 16:13     ` Martin Sebor
2020-03-20 15:40       ` Martin Liška
2020-03-20 15:43         ` Jakub Jelinek
2020-03-20 15:55           ` Martin Liška
2020-05-21 12:04             ` Martin Liška
2020-06-09 21:01               ` Jeff Law
2020-06-18 11:32                 ` Luis Machado
2020-06-18 12:21                   ` Martin Liška
2020-06-18 15:02                     ` Jeff Law
2020-06-18 15:36                       ` Martin Liška [this message]
2020-06-24  7:44                         ` Martin Liška
2020-06-18 15:40                   ` Martin Liška
2020-06-18 15:47                     ` Luis Machado
2020-06-18 16:02                       ` Martin Liška
2020-06-18 17:18                         ` Luis Machado
2020-06-18 18:34                           ` Martin Liška
2020-06-18 21:24                             ` Luis Machado
2020-06-24  7:25                     ` Martin Liška

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=500f2f59-687c-13b1-c003-2570abd2177c@suse.cz \
    --to=mliska@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=jakub@redhat.com \
    --cc=law@redhat.com \
    --cc=luis.machado@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).