public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/114314] New: [14 Regression] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags
@ 2024-03-11 23:04 patrick at rivosinc dot com
  2024-03-11 23:13 ` [Bug driver/114314] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: patrick at rivosinc dot com @ 2024-03-11 23:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114314
           Summary: [14 Regression] ICE: in common_handle_option, at
                    opts.cc:3356 with -fno-multiflags
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at rivosinc dot com
  Target Milestone: ---

Testcase:
int square(int num) {
    return num * num;
}

Backtrace:
> /scratch/tc-testing/tc-mar-11/build-rv64gcv/bin/riscv64-unknown-linux-gnu-gcc -fno-multiflags red.c -freport-bug
cc1: internal compiler error: in common_handle_option, at opts.cc:3356
0xbfd174 common_handle_option(gcc_options*, gcc_options*, cl_decoded_option
const*, unsigned int, int, unsigned int, cl_option_handlers const*,
diagnostic_context*, void (*)())
        ../../../gcc/gcc/opts.cc:3356
0x2c40a93 handle_option
        ../../../gcc/gcc/opts-common.cc:1297
0x2c40c0c read_cmdline_option(gcc_options*, gcc_options*, cl_decoded_option*,
unsigned int, unsigned int, cl_option_handlers const*, diagnostic_context*)
        ../../../gcc/gcc/opts-common.cc:1627
0x11f126c read_cmdline_options
        ../../../gcc/gcc/opts-global.cc:242
0x11f126c decode_options(gcc_options*, gcc_options*, cl_decoded_option*,
unsigned int, unsigned int, diagnostic_context*, void (*)())
        ../../../gcc/gcc/opts-global.cc:324
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.

Godbolt: https://godbolt.org/z/e3qevc464

I'm not sure what component parses the args, so I'm choosing the c frontend
since it's the earliest component I know.

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

* [Bug driver/114314] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags
  2024-03-11 23:04 [Bug c/114314] New: [14 Regression] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags patrick at rivosinc dot com
@ 2024-03-11 23:13 ` pinskia at gcc dot gnu.org
  2024-03-12  0:38 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-11 23:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |driver
            Summary|[14 Regression] ICE: in     |ICE: in
                   |common_handle_option, at    |common_handle_option, at
                   |opts.cc:3356 with           |opts.cc:3356 with
                   |-fno-multiflags             |-fno-multiflags

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://gcc.gnu.org/pipermail/gcc-patches/2022-June/597419.html


Looks a missing rejects negative and it should not be passed from the driver to
cc1 either.

Maybe the rejects negative will fix the issue in general.


Oh this was added in gcc 13 and not just 14; maybe just ice checking.

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

* [Bug driver/114314] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags
  2024-03-11 23:04 [Bug c/114314] New: [14 Regression] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags patrick at rivosinc dot com
  2024-03-11 23:13 ` [Bug driver/114314] " pinskia at gcc dot gnu.org
@ 2024-03-12  0:38 ` pinskia at gcc dot gnu.org
  2024-03-12  0:39 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-12  0:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-03-12
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
    case OPT_fmultiflags:
      gcc_checking_assert (lang_mask == CL_DRIVER);
      break;

Yes it is a checking assert.

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

* [Bug driver/114314] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags
  2024-03-11 23:04 [Bug c/114314] New: [14 Regression] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags patrick at rivosinc dot com
  2024-03-11 23:13 ` [Bug driver/114314] " pinskia at gcc dot gnu.org
  2024-03-12  0:38 ` pinskia at gcc dot gnu.org
@ 2024-03-12  0:39 ` pinskia at gcc dot gnu.org
  2024-03-12  4:00 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-12  0:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
And yes adding RejectNegative fixes the ICE.

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

* [Bug driver/114314] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags
  2024-03-11 23:04 [Bug c/114314] New: [14 Regression] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags patrick at rivosinc dot com
                   ` (2 preceding siblings ...)
  2024-03-12  0:39 ` pinskia at gcc dot gnu.org
@ 2024-03-12  4:00 ` cvs-commit at gcc dot gnu.org
  2024-03-12  4:02 ` cvs-commit at gcc dot gnu.org
  2024-03-12  4:02 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-12  4:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:c4e5789cede6974b6483c0f82069ff80b5a547e4

commit r14-9434-gc4e5789cede6974b6483c0f82069ff80b5a547e4
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Mon Mar 11 17:40:08 2024 -0700

    Reject -fno-multiflags [PR114314]

    When -fmultiflags option support was added in r13-3693-g6b1a2474f9e422,
    it accidently allowed -fno-multiflags which then would pass on to cc1.
    This fixes that oversight.

    Committed as obvious after bootstrap/test on x86_64-linux-gnu.

    gcc/ChangeLog:

            PR driver/114314
            * common.opt (fmultiflags): Add RejectNegative.

    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>

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

* [Bug driver/114314] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags
  2024-03-11 23:04 [Bug c/114314] New: [14 Regression] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags patrick at rivosinc dot com
                   ` (3 preceding siblings ...)
  2024-03-12  4:00 ` cvs-commit at gcc dot gnu.org
@ 2024-03-12  4:02 ` cvs-commit at gcc dot gnu.org
  2024-03-12  4:02 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-12  4:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Andrew Pinski
<pinskia@gcc.gnu.org>:

https://gcc.gnu.org/g:4bd9d097197334e786690ba1566ccf79396da730

commit r13-8419-g4bd9d097197334e786690ba1566ccf79396da730
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Mon Mar 11 17:40:08 2024 -0700

    Reject -fno-multiflags [PR114314]

    When -fmultiflags option support was added in r13-3693-g6b1a2474f9e422,
    it accidently allowed -fno-multiflags which then would pass on to cc1.
    This fixes that oversight.

    Committed as obvious after bootstrap/test on x86_64-linux-gnu.

    gcc/ChangeLog:

            PR driver/114314
            * common.opt (fmultiflags): Add RejectNegative.

    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
    (cherry picked from commit c4e5789cede6974b6483c0f82069ff80b5a547e4)

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

* [Bug driver/114314] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags
  2024-03-11 23:04 [Bug c/114314] New: [14 Regression] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags patrick at rivosinc dot com
                   ` (4 preceding siblings ...)
  2024-03-12  4:02 ` cvs-commit at gcc dot gnu.org
@ 2024-03-12  4:02 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-12  4:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |13.3
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2024-03-12  4:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-11 23:04 [Bug c/114314] New: [14 Regression] ICE: in common_handle_option, at opts.cc:3356 with -fno-multiflags patrick at rivosinc dot com
2024-03-11 23:13 ` [Bug driver/114314] " pinskia at gcc dot gnu.org
2024-03-12  0:38 ` pinskia at gcc dot gnu.org
2024-03-12  0:39 ` pinskia at gcc dot gnu.org
2024-03-12  4:00 ` cvs-commit at gcc dot gnu.org
2024-03-12  4:02 ` cvs-commit at gcc dot gnu.org
2024-03-12  4:02 ` pinskia 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).