public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed)
@ 2021-01-11 12:00 acoplan at gcc dot gnu.org
  2021-01-11 12:15 ` [Bug rtl-optimization/98619] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-01-11 12:00 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98619
           Summary: aarch64: ICE (verify_flow_info failed)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

The following fails:

$ cat test.c
int a() {
  int *b;
  asm goto("" : "=mk"(b) : : : c);
d:
c:
}
$ aarch64-elf-gcc -c test.c
test.c: In function 'a':
test.c:6:1: error: too many outgoing branch edges from bb 2
    6 | }
      | ^
during RTL pass: reload
test.c:6:1: internal compiler error: verify_flow_info failed
0x897451 verify_flow_info()
        /home/alecop01/toolchain/src/gcc/gcc/cfghooks.c:269
0xcd9d55 execute_function_todo
        /home/alecop01/toolchain/src/gcc/gcc/passes.c:2054
0xcd9e80 do_per_function
        /home/alecop01/toolchain/src/gcc/gcc/passes.c:1687
0xcda01b execute_todo
        /home/alecop01/toolchain/src/gcc/gcc/passes.c:2096
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.

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

* [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed)
  2021-01-11 12:00 [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed) acoplan at gcc dot gnu.org
@ 2021-01-11 12:15 ` rguenth at gcc dot gnu.org
  2021-07-19 16:00 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-11 12:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
We might be able to CFG cleanup this to a non-goto asm [unless the 'goto'
invokes
semantic differences elsewhere]

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

* [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed)
  2021-01-11 12:00 [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed) acoplan at gcc dot gnu.org
  2021-01-11 12:15 ` [Bug rtl-optimization/98619] " rguenth at gcc dot gnu.org
@ 2021-07-19 16:00 ` pinskia at gcc dot gnu.org
  2023-06-27  0:09 ` [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed) with asm goto with output and same block and two labels pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-19 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-07-19
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed) with asm goto with output and same block and two labels
  2021-01-11 12:00 [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed) acoplan at gcc dot gnu.org
  2021-01-11 12:15 ` [Bug rtl-optimization/98619] " rguenth at gcc dot gnu.org
  2021-07-19 16:00 ` pinskia at gcc dot gnu.org
@ 2023-06-27  0:09 ` pinskia at gcc dot gnu.org
  2023-06-27  3:27 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-27  0:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
if asm goto is marked as volatile, it is fixed ...

so mine.

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

* [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed) with asm goto with output and same block and two labels
  2021-01-11 12:00 [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed) acoplan at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-06-27  0:09 ` [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed) with asm goto with output and same block and two labels pinskia at gcc dot gnu.org
@ 2023-06-27  3:27 ` pinskia at gcc dot gnu.org
  2023-06-27 16:28 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-27  3:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2023-June/62
                   |                            |2906.html
           Keywords|                            |patch

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Patch posted:
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/622906.html

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

* [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed) with asm goto with output and same block and two labels
  2021-01-11 12:00 [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed) acoplan at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-06-27  3:27 ` pinskia at gcc dot gnu.org
@ 2023-06-27 16:28 ` cvs-commit at gcc dot gnu.org
  2023-06-27 16:29 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-27 16:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS 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:478840a2ca491fbff44371caee4983d1e7b7b7cf

commit r14-2133-g478840a2ca491fbff44371caee4983d1e7b7b7cf
Author: Andrew Pinski <apinski@marvell.com>
Date:   Mon Jun 26 17:14:06 2023 -0700

    Mark asm goto with outputs as volatile

    The manual references asm goto as being implicitly volatile already
    and that was done when asm goto could not have outputs. When outputs
    were added to `asm goto`, only asm goto without outputs were still being
    marked as volatile. Now some parts of GCC decide, removing the `asm goto`
    is ok if the output is not used, though not updating the CFG (this happens
    on both the RTL level and the gimple level). Since the biggest user of `asm
goto`
    is the Linux kernel and they expect them to be volatile (they use them to
    copy to/from userspace), we should just mark the inline-asm as volatile.

    OK? Bootstrapped and tested on x86_64-linux-gnu.

            PR middle-end/110420
            PR middle-end/103979
            PR middle-end/98619

    gcc/ChangeLog:

            * gimplify.cc (gimplify_asm_expr): Mark asm with labels as
volatile.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/compile/asmgoto-6.c: New test.

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

* [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed) with asm goto with output and same block and two labels
  2021-01-11 12:00 [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed) acoplan at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-06-27 16:28 ` cvs-commit at gcc dot gnu.org
@ 2023-06-27 16:29 ` pinskia at gcc dot gnu.org
  2023-06-27 16:46 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-27 16:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |14.0

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 14 and will be backporting to GCC 12.x and 13.x.

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

* [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed) with asm goto with output and same block and two labels
  2021-01-11 12:00 [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed) acoplan at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-06-27 16:29 ` pinskia at gcc dot gnu.org
@ 2023-06-27 16:46 ` cvs-commit at gcc dot gnu.org
  2023-06-27 17:21 ` cvs-commit at gcc dot gnu.org
  2023-06-27 17:25 ` pinskia at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-27 16:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS 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:81fa6dfe1691e93664ef3b4fa66c1e057acea281

commit r13-7484-g81fa6dfe1691e93664ef3b4fa66c1e057acea281
Author: Andrew Pinski <apinski@marvell.com>
Date:   Mon Jun 26 17:14:06 2023 -0700

    Mark asm goto with outputs as volatile

    The manual references asm goto as being implicitly volatile already
    and that was done when asm goto could not have outputs. When outputs
    were added to `asm goto`, only asm goto without outputs were still being
    marked as volatile. Now some parts of GCC decide, removing the `asm goto`
    is ok if the output is not used, though not updating the CFG (this happens
    on both the RTL level and the gimple level). Since the biggest user of `asm
goto`
    is the Linux kernel and they expect them to be volatile (they use them to
    copy to/from userspace), we should just mark the inline-asm as volatile.

    OK? Bootstrapped and tested on x86_64-linux-gnu.

            PR middle-end/110420
            PR middle-end/103979
            PR middle-end/98619

    gcc/ChangeLog:

            * gimplify.cc (gimplify_asm_expr): Mark asm with labels as
volatile.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/compile/asmgoto-6.c: New test.

    (cherry picked from commit 478840a2ca491fbff44371caee4983d1e7b7b7cf)

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

* [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed) with asm goto with output and same block and two labels
  2021-01-11 12:00 [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed) acoplan at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-06-27 16:46 ` cvs-commit at gcc dot gnu.org
@ 2023-06-27 17:21 ` cvs-commit at gcc dot gnu.org
  2023-06-27 17:25 ` pinskia at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-06-27 17:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r12-9732-gee3bb7cb5d2ecfc64adcfd61afb390e72cc08661
Author: Andrew Pinski <apinski@marvell.com>
Date:   Mon Jun 26 17:14:06 2023 -0700

    Mark asm goto with outputs as volatile

    The manual references asm goto as being implicitly volatile already
    and that was done when asm goto could not have outputs. When outputs
    were added to `asm goto`, only asm goto without outputs were still being
    marked as volatile. Now some parts of GCC decide, removing the `asm goto`
    is ok if the output is not used, though not updating the CFG (this happens
    on both the RTL level and the gimple level). Since the biggest user of `asm
goto`
    is the Linux kernel and they expect them to be volatile (they use them to
    copy to/from userspace), we should just mark the inline-asm as volatile.

    OK? Bootstrapped and tested on x86_64-linux-gnu.

            PR middle-end/110420
            PR middle-end/103979
            PR middle-end/98619

    gcc/ChangeLog:

            * gimplify.cc (gimplify_asm_expr): Mark asm with labels as
volatile.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/compile/asmgoto-6.c: New test.

    (cherry picked from commit 478840a2ca491fbff44371caee4983d1e7b7b7cf)

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

* [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed) with asm goto with output and same block and two labels
  2021-01-11 12:00 [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed) acoplan at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-06-27 17:21 ` cvs-commit at gcc dot gnu.org
@ 2023-06-27 17:25 ` pinskia at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-27 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |12.3.1, 13.1.1
   Target Milestone|---                         |12.4
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

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

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

end of thread, other threads:[~2023-06-27 17:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 12:00 [Bug rtl-optimization/98619] New: aarch64: ICE (verify_flow_info failed) acoplan at gcc dot gnu.org
2021-01-11 12:15 ` [Bug rtl-optimization/98619] " rguenth at gcc dot gnu.org
2021-07-19 16:00 ` pinskia at gcc dot gnu.org
2023-06-27  0:09 ` [Bug rtl-optimization/98619] aarch64: ICE (verify_flow_info failed) with asm goto with output and same block and two labels pinskia at gcc dot gnu.org
2023-06-27  3:27 ` pinskia at gcc dot gnu.org
2023-06-27 16:28 ` cvs-commit at gcc dot gnu.org
2023-06-27 16:29 ` pinskia at gcc dot gnu.org
2023-06-27 16:46 ` cvs-commit at gcc dot gnu.org
2023-06-27 17:21 ` cvs-commit at gcc dot gnu.org
2023-06-27 17:25 ` 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).