public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/103709] New: ICE: 'global_options' are modified in local context
@ 2021-12-14 11:11 asolokha at gmx dot com
  2021-12-14 13:19 ` [Bug target/103709] " marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2021-12-14 11:11 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103709
           Summary: ICE: 'global_options' are modified in local context
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---
            Target: powerpc-*-linux-gnu

+++ This bug was initially created as a clone of Bug #92860 +++

gcc, at least configured for powerpc target and invoked w/ -mcpu= set to a
value valid to that target, ICEs when compiling testcases w/ explicitly wrong
(non-powerpc)
#pragrma GCC target ("")
statements:

% powerpc-e300c3-linux-gnu-gcc-12.0.0 -mcpu=401 -c
gcc/testsuite/gcc.target/i386/pr78451.c
gcc/testsuite/gcc.target/i386/pr78451.c:5:9: error: #pragma GCC target
'avx512bw' is invalid
    5 | #pragma GCC target ("avx512bw")
      |         ^~~
gcc/testsuite/gcc.target/i386/pr78451.c:14:9: error: #pragma GCC target
'avx512vl' is invalid
   14 | #pragma GCC target ("avx512vl")
      |         ^~~
gcc/testsuite/gcc.target/i386/pr78451.c:22:9: internal compiler error:
'global_options' are modified in local context
   22 | #pragma GCC pop_options
      |         ^~~
0xda415d cl_optimization_compare(gcc_options*, gcc_options*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211212/work/build/gcc/options-save.c:14102
0x90c183 handle_pragma_pop_options
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/c-family/c-pragma.c:1137
0x8769d7 c_parser_pragma
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/c/c-parser.c:12615
0x8a2bb5 c_parser_external_declaration
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/c/c-parser.c:1760
0x8a31cb c_parser_translation_unit
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/c/c-parser.c:1652
0x8a31cb c_parse_file()
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/c/c-parser.c:23324
0x909bd9 c_common_parse_file()
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/c-family/c-opts.c:1238

It was initially reported in PR92860 comment 38.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/103709] ICE: 'global_options' are modified in local context
  2021-12-14 11:11 [Bug c/103709] New: ICE: 'global_options' are modified in local context asolokha at gmx dot com
@ 2021-12-14 13:19 ` marxin at gcc dot gnu.org
  2021-12-16 11:08 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-14 13:19 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2021-12-14
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=92860
     Ever confirmed|0                           |1
          Component|c                           |target

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Thanks, I'm going to take a look.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/103709] ICE: 'global_options' are modified in local context
  2021-12-14 11:11 [Bug c/103709] New: ICE: 'global_options' are modified in local context asolokha at gmx dot com
  2021-12-14 13:19 ` [Bug target/103709] " marxin at gcc dot gnu.org
@ 2021-12-16 11:08 ` marxin at gcc dot gnu.org
  2021-12-16 11:09 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-16 11:08 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
All right, I've got a patch candidate:
https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586999.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/103709] ICE: 'global_options' are modified in local context
  2021-12-14 11:11 [Bug c/103709] New: ICE: 'global_options' are modified in local context asolokha at gmx dot com
  2021-12-14 13:19 ` [Bug target/103709] " marxin at gcc dot gnu.org
  2021-12-16 11:08 ` marxin at gcc dot gnu.org
@ 2021-12-16 11:09 ` marxin at gcc dot gnu.org
  2021-12-16 16:52 ` cvs-commit at gcc dot gnu.org
  2021-12-16 16:53 ` marxin at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-16 11:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #2)
> All right, I've got a patch candidate:
> https://gcc.gnu.org/pipermail/gcc-patches/2021-December/586999.html

Sorry, wrong bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/103709] ICE: 'global_options' are modified in local context
  2021-12-14 11:11 [Bug c/103709] New: ICE: 'global_options' are modified in local context asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-12-16 11:09 ` marxin at gcc dot gnu.org
@ 2021-12-16 16:52 ` cvs-commit at gcc dot gnu.org
  2021-12-16 16:53 ` marxin at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-16 16:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:54e6d3ef5021d7df936132ba961f9c360239e717

commit r12-6019-g54e6d3ef5021d7df936132ba961f9c360239e717
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Dec 16 13:33:00 2021 +0100

    opts: do not do sanity check when an error is seen

            PR target/103709

    gcc/c-family/ChangeLog:

            * c-pragma.c (handle_pragma_pop_options): Do not check
            global options modification when an error is seen in parsing
            of options (pragmas or attributes).

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug target/103709] ICE: 'global_options' are modified in local context
  2021-12-14 11:11 [Bug c/103709] New: ICE: 'global_options' are modified in local context asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2021-12-16 16:52 ` cvs-commit at gcc dot gnu.org
@ 2021-12-16 16:53 ` marxin at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-16 16:53 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Fixed on master, not planning to backport as it depends on quite some
option-related patches that were done in GCC 12 timeframe.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-12-16 16:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 11:11 [Bug c/103709] New: ICE: 'global_options' are modified in local context asolokha at gmx dot com
2021-12-14 13:19 ` [Bug target/103709] " marxin at gcc dot gnu.org
2021-12-16 11:08 ` marxin at gcc dot gnu.org
2021-12-16 11:09 ` marxin at gcc dot gnu.org
2021-12-16 16:52 ` cvs-commit at gcc dot gnu.org
2021-12-16 16:53 ` marxin at gcc dot gnu.org

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).