public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/104705] New: [12 regression] ICE ‘global_options’ are modified in local context in cl_optimization_compare
@ 2022-02-26 20:59 slyfox at gcc dot gnu.org
  2022-02-26 21:02 ` [Bug middle-end/104705] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: slyfox at gcc dot gnu.org @ 2022-02-26 20:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104705
           Summary: [12 regression] ICE ‘global_options’ are modified in
                    local context in cl_optimization_compare
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: slyfox at gcc dot gnu.org
                CC: mliska at suse dot cz
  Target Milestone: ---

Tried to build ghc-HEAD with gcc-master today, got an ICE on pragmas in
intrisics.

Here is a small reproducer (I think I lost real "optimize" value during
shrinking, does it matter much for this ICE?):

    //$ cat a.c
    #pragma GCC optimize "foo"
    #pragma GCC push_options
    #pragma GCC pop_options

$ /tmp/bg/gcc/xgcc -B/tmp/bg/gcc -c a.c  -O2 -Wall
a.c:1:9: warning: bad option ‘-ffoo’ to pragma ‘optimize’ [-Wpragmas]
    1 | #pragma GCC optimize "foo"
      |         ^~~
a.c:3:9: internal compiler error: ‘global_options’ are modified in local
context
    3 | #pragma GCC pop_options
      |         ^~~
0xccf111 cl_optimization_compare(gcc_options*, gcc_options*)
        /tmp/bg/gcc/options-save.cc:15919
0x7ca26f handle_pragma_pop_options
        /home/slyfox/dev/git/gcc/gcc/c-family/c-pragma.cc:1141
0x7cd42e c_invoke_pragma_handler(unsigned int)
        /home/slyfox/dev/git/gcc/gcc/c-family/c-pragma.cc:1569
0x72a4ca c_parser_pragma
        /home/slyfox/dev/git/gcc/gcc/c/c-parser.cc:12621
0x7555e7 c_parser_external_declaration
        /home/slyfox/dev/git/gcc/gcc/c/c-parser.cc:1760
0x75596a c_parser_translation_unit
        /home/slyfox/dev/git/gcc/gcc/c/c-parser.cc:1652
0x75596a c_parse_file()
        /home/slyfox/dev/git/gcc/gcc/c/c-parser.cc:23357
0x7c7e81 c_common_parse_file()
        /home/slyfox/dev/git/gcc/gcc/c-family/c-opts.cc:1238
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.

$ /tmp/bg/gcc/xgcc -B/tmp/bg/gcc -v
Reading specs from /tmp/bg/gcc/specs
COLLECT_GCC=/tmp/bg/gcc/xgcc
COLLECT_LTO_WRAPPER=/tmp/bg/gcc/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib
--disable-bootstrap
--with-native-system-header-dir=/<<NIX>>/glibc-2.33-108-dev/include
--prefix=/tmp/bg/__td__ CFLAGS='-O1 -ggdb3' CXXFLAGS='-O1 -ggdb3' LDFLAGS='-O1
-ggdb3'
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.1 20220226 (experimental) (GCC)

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

* [Bug middle-end/104705] [12 regression] ICE ‘global_options’ are modified in local context in cl_optimization_compare
  2022-02-26 20:59 [Bug c/104705] New: [12 regression] ICE ‘global_options’ are modified in local context in cl_optimization_compare slyfox at gcc dot gnu.org
@ 2022-02-26 21:02 ` pinskia at gcc dot gnu.org
  2022-02-26 21:03 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-26 21:02 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
          Component|c                           |middle-end
   Target Milestone|---                         |12.0

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

* [Bug middle-end/104705] [12 regression] ICE ‘global_options’ are modified in local context in cl_optimization_compare
  2022-02-26 20:59 [Bug c/104705] New: [12 regression] ICE ‘global_options’ are modified in local context in cl_optimization_compare slyfox at gcc dot gnu.org
  2022-02-26 21:02 ` [Bug middle-end/104705] " pinskia at gcc dot gnu.org
@ 2022-02-26 21:03 ` pinskia at gcc dot gnu.org
  2022-02-27  9:27 ` marxin at gcc dot gnu.org
  2022-02-28  9:17 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-02-26 21:03 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2022-02-26
           Keywords|                            |needs-bisection
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Interesting it does not ICE with -g.

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

* [Bug middle-end/104705] [12 regression] ICE ‘global_options’ are modified in local context in cl_optimization_compare
  2022-02-26 20:59 [Bug c/104705] New: [12 regression] ICE ‘global_options’ are modified in local context in cl_optimization_compare slyfox at gcc dot gnu.org
  2022-02-26 21:02 ` [Bug middle-end/104705] " pinskia at gcc dot gnu.org
  2022-02-26 21:03 ` pinskia at gcc dot gnu.org
@ 2022-02-27  9:27 ` marxin at gcc dot gnu.org
  2022-02-28  9:17 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-27  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Mine.

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

* [Bug middle-end/104705] [12 regression] ICE ‘global_options’ are modified in local context in cl_optimization_compare
  2022-02-26 20:59 [Bug c/104705] New: [12 regression] ICE ‘global_options’ are modified in local context in cl_optimization_compare slyfox at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-02-27  9:27 ` marxin at gcc dot gnu.org
@ 2022-02-28  9:17 ` marxin at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-28  9:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
The root cause is the same as PR104381.

*** This bug has been marked as a duplicate of bug 104381 ***

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

end of thread, other threads:[~2022-02-28  9:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-26 20:59 [Bug c/104705] New: [12 regression] ICE ‘global_options’ are modified in local context in cl_optimization_compare slyfox at gcc dot gnu.org
2022-02-26 21:02 ` [Bug middle-end/104705] " pinskia at gcc dot gnu.org
2022-02-26 21:03 ` pinskia at gcc dot gnu.org
2022-02-27  9:27 ` marxin at gcc dot gnu.org
2022-02-28  9:17 ` 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).