public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262
@ 2023-06-26 22:15 jbglaw@lug-owl.de
  2023-06-26 22:27 ` [Bug tree-optimization/110420] [14 Regression] " pinskia at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: jbglaw@lug-owl.de @ 2023-06-26 22:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110420
           Summary: internal compiler error: in
                    gimple_redirect_edge_and_branch, at tree-cfg.cc:6262
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jbglaw@lug-owl.de
  Target Milestone: ---

Created attachment 55400
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55400&action=edit
Preprocessed input.

Starting with g:21e2ef2dc, I see a new ICE building a PPC Linux kernel for the
adder875_defconfig config (see eg.
http://toolchain.lug-owl.de/laminar/jobs/linux-powerpc-adder875_defconfig/100):

[mk all 2023-06-26 02:31:11] # CC      arch/powerpc/kernel/ptrace/ptrace-view.o
[mk all 2023-06-26 02:31:11]   powerpc-linux-gcc
-Wp,-MMD,arch/powerpc/kernel/ptrace/.ptrace-view.o.d -nostdinc
-I./arch/powerpc/include -I./arch/powerpc/include/generated  -I./include
-I./arch/powerpc/include/uapi -I./arch/powerpc/include/generated/uapi
-I./include/uapi -I./include/generated/uapi -include
./include/linux/compiler-version.h -include ./include/linux/kconfig.h -include
./include/linux/compiler_types.h -D__KERNEL__ -I ./arch/powerpc
-fmacro-prefix-map=./= -Wall -Wundef -Werror=strict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -fshort-wchar -fno-PIE
-Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type
-Wno-format-security -funsigned-char -std=gnu11 -mbig-endian -m32 -msoft-float
-pipe -ffixed-r2 -mmultiple -mno-readonly-in-sdata -mcpu=860 -mno-prefixed
-mno-pcrel -mno-altivec -mno-vsx -mno-mma -fno-asynchronous-unwind-tables
-mno-string -mbig-endian -mstack-protector-guard=tls
-mstack-protector-guard-reg=r2 -fno-delete-null-pointer-checks
-Wno-frame-address -Wno-format-truncation -Wno-format-overflow
-Wno-address-of-packed-member -O2 -fno-allow-store-data-races
-Wframe-larger-than=1024 -fstack-protector-strong -Wno-main
-Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-dangling-pointer
-fomit-frame-pointer -ftrivial-auto-var-init=zero -fno-stack-clash-protection
-Wdeclaration-after-statement -Wvla -Wno-pointer-sign -Wcast-function-type
-Wno-stringop-truncation -Wno-stringop-overflow -Wno-restrict
-Wno-maybe-uninitialized -Wno-array-bounds -Wno-alloc-size-larger-than
-Wimplicit-fallthrough=5 -fno-strict-overflow -fno-stack-check -fconserve-stack
-Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init
-Wno-packed-not-aligned -g -mstack-protector-guard-offset=544 -Werror
-DUTS_MACHINE='"ppc"'   
-DKBUILD_MODFILE='"arch/powerpc/kernel/ptrace/ptrace-view"'
-DKBUILD_BASENAME='"ptrace_view"' -DKBUILD_MODNAME='"ptrace_view"'
-D__KBUILD_MODNAME=kmod_ptrace_view -c -o
arch/powerpc/kernel/ptrace/ptrace-view.o
arch/powerpc/kernel/ptrace/ptrace-view.c  
[mk all 2023-06-26 02:31:13] during GIMPLE pass: pre
[mk all 2023-06-26 02:31:13] arch/powerpc/kernel/ptrace/ptrace-view.c: In
function 'gpr32_set_common':
[mk all 2023-06-26 02:31:13] arch/powerpc/kernel/ptrace/ptrace-view.c:649:5:
internal compiler error: in gimple_redirect_edge_and_branch, at
tree-cfg.cc:6262
[mk all 2023-06-26 02:31:13]   649 | int gpr32_set_common(struct task_struct
*target,
[mk all 2023-06-26 02:31:13]       |     ^~~~~~~~~~~~~~~~
[mk all 2023-06-26 02:31:13] 0x1a562a6 internal_error(char const*, ...)
[mk all 2023-06-26 02:31:13]    ???:0
[mk all 2023-06-26 02:31:13] 0x826ea1 fancy_abort(char const*, int, char
const*)
[mk all 2023-06-26 02:31:13]    ???:0
[mk all 2023-06-26 02:31:13] 0x9b77c9 redirect_edge_and_branch(edge_def*,
basic_block_def*)
[mk all 2023-06-26 02:31:13]    ???:0
[mk all 2023-06-26 02:31:13] 0x9b7e43 split_edge(edge_def*)
[mk all 2023-06-26 02:31:13]    ???:0
[mk all 2023-06-26 02:31:13] 0xee1cc7 split_critical_edges(bool)
[mk all 2023-06-26 02:31:13]    ???:0
[mk all 2023-06-26 02:31:13] Please submit a full bug report, with preprocessed
source (by using -freport-bug).
[mk all 2023-06-26 02:31:13] Please include the complete backtrace with any bug
report.
[mk all 2023-06-26 02:31:13] See <https://gcc.gnu.org/bugs/> for instructions.
[mk all 2023-06-26 02:31:13] make[4]: *** [scripts/Makefile.build:252:
arch/powerpc/kernel/ptrace/ptrace-view.o] Error 1
[mk all 2023-06-26 02:31:13] make[3]: *** [scripts/Makefile.build:494:
arch/powerpc/kernel/ptrace] Error 2
[mk all 2023-06-26 02:31:13] make[2]: *** [scripts/Makefile.build:494:
arch/powerpc/kernel] Error 2
[mk all 2023-06-26 02:31:13] make[1]: *** [scripts/Makefile.build:494:
arch/powerpc] Error 2
[mk all 2023-06-26 02:31:13] make: *** [Makefile:2026: .] Error 2



The full command line is seen above, I'll also attach preprocessed input.
(-freport-bug didn't generate something?)

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

* [Bug tree-optimization/110420] [14 Regression] internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
@ 2023-06-26 22:27 ` pinskia at gcc dot gnu.org
  2023-06-26 23:09 ` [Bug tree-optimization/110420] [12/13/14 " pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-26 22:27 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
            Summary|internal compiler error: in |[14 Regression] internal
                   |gimple_redirect_edge_and_br |compiler error: in
                   |anch, at tree-cfg.cc:6262   |gimple_redirect_edge_and_br
                   |                            |anch, at tree-cfg.cc:6262
           Keywords|                            |ice-on-valid-code

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reducing and trying to figure out what is going wrong .

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

* [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
  2023-06-26 22:27 ` [Bug tree-optimization/110420] [14 Regression] " pinskia at gcc dot gnu.org
@ 2023-06-26 23:09 ` pinskia at gcc dot gnu.org
  2023-06-26 23:34 ` [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-26 23:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |11.1.0, 11.4.0
      Known to fail|                            |12.1.0
     Ever confirmed|0                           |1
            Summary|[14 Regression] internal    |[12/13/14 Regression]
                   |compiler error: in          |internal compiler error: in
                   |gimple_redirect_edge_and_br |gimple_redirect_edge_and_br
                   |anch, at tree-cfg.cc:6262   |anch, at tree-cfg.cc:6262
   Last reconfirmed|                            |2023-06-26
   Target Milestone|14.0                        |13.2
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase that shows this is a regression in GCC 12+:
```
static int t;
void g(void);

void f(void)
{
  int  __gu_val;
  asm goto(""
     : "=&r"(__gu_val)
     :
     :
     : Efault);
  t = __gu_val;
  g();
Efault:
}

```
simple_dce_from_worklist is removing the statement (in this case during inline
but in the original case it was during ccp1 but it was the same issue).

```
Removing statement, writes to write only var:
# .MEM_4 = VDEF <.MEM_3(D)>
t = __gu_val_2;
Removing dead stmt:__asm__ goto("" : "=&r" __gu_val_2 :  :  : "Efault" Efault);
```

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

* [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto`
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
  2023-06-26 22:27 ` [Bug tree-optimization/110420] [14 Regression] " pinskia at gcc dot gnu.org
  2023-06-26 23:09 ` [Bug tree-optimization/110420] [12/13/14 " pinskia at gcc dot gnu.org
@ 2023-06-26 23:34 ` pinskia at gcc dot gnu.org
  2023-06-26 23:54 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-26 23:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12/13/14 Regression]       |[12/13/14 Regression]
                   |internal compiler error: in |internal compiler error: in
                   |gimple_redirect_edge_and_br |gimple_redirect_edge_and_br
                   |anch, at tree-cfg.cc:6262   |anch due to
                   |                            |simple_dce_from_worklist
                   |                            |removing `asm goto`

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note

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

* [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto`
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
                   ` (2 preceding siblings ...)
  2023-06-26 23:34 ` [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto` pinskia at gcc dot gnu.org
@ 2023-06-26 23:54 ` pinskia at gcc dot gnu.org
  2023-06-27  0:10 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-26 23:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 55401
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55401&action=edit
Patch

So this is another `asm goto` not being considered as volatile.
Anyways that fixes that issue.

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

* [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto`
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
                   ` (3 preceding siblings ...)
  2023-06-26 23:54 ` pinskia at gcc dot gnu.org
@ 2023-06-27  0:10 ` pinskia at gcc dot gnu.org
  2023-06-27  3:26 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-27  0:10 UTC (permalink / raw)
  To: gcc-bugs

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

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 #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Mine.

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

* [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto`
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
                   ` (4 preceding siblings ...)
  2023-06-27  0:10 ` pinskia at gcc dot gnu.org
@ 2023-06-27  3:26 ` pinskia at gcc dot gnu.org
  2023-06-27 10:50 ` jbglaw@lug-owl.de
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-27  3:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 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] 13+ messages in thread

* [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto`
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
                   ` (5 preceding siblings ...)
  2023-06-27  3:26 ` pinskia at gcc dot gnu.org
@ 2023-06-27 10:50 ` jbglaw@lug-owl.de
  2023-06-27 16:28 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jbglaw@lug-owl.de @ 2023-06-27 10:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jan-Benedict Glaw <jbglaw@lug-owl.de> ---
Confirmed: This patch fixes the issue for me with the Linux PPC builds.

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

* [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto`
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
                   ` (6 preceding siblings ...)
  2023-06-27 10:50 ` jbglaw@lug-owl.de
@ 2023-06-27 16:28 ` cvs-commit at gcc dot gnu.org
  2023-06-27 16:29 ` [Bug tree-optimization/110420] [12/13 " pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ 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=110420

--- Comment #8 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] 13+ messages in thread

* [Bug tree-optimization/110420] [12/13 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto`
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
                   ` (7 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)
  11 siblings, 0 replies; 13+ 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=110420

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[12/13/14 Regression]       |[12/13 Regression] internal
                   |internal compiler error: in |compiler error: in
                   |gimple_redirect_edge_and_br |gimple_redirect_edge_and_br
                   |anch due to                 |anch due to
                   |simple_dce_from_worklist    |simple_dce_from_worklist
                   |removing `asm goto`         |removing `asm goto`
      Known to work|                            |14.0

--- Comment #9 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] 13+ messages in thread

* [Bug tree-optimization/110420] [12/13 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto`
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
                   ` (8 preceding siblings ...)
  2023-06-27 16:29 ` [Bug tree-optimization/110420] [12/13 " 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:24 ` pinskia at gcc dot gnu.org
  11 siblings, 0 replies; 13+ 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=110420

--- Comment #10 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] 13+ messages in thread

* [Bug tree-optimization/110420] [12/13 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto`
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
                   ` (9 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:24 ` pinskia at gcc dot gnu.org
  11 siblings, 0 replies; 13+ 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=110420

--- Comment #11 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] 13+ messages in thread

* [Bug tree-optimization/110420] [12/13 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto`
  2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
                   ` (10 preceding siblings ...)
  2023-06-27 17:21 ` cvs-commit at gcc dot gnu.org
@ 2023-06-27 17:24 ` pinskia at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-27 17:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

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

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26 22:15 [Bug tree-optimization/110420] New: internal compiler error: in gimple_redirect_edge_and_branch, at tree-cfg.cc:6262 jbglaw@lug-owl.de
2023-06-26 22:27 ` [Bug tree-optimization/110420] [14 Regression] " pinskia at gcc dot gnu.org
2023-06-26 23:09 ` [Bug tree-optimization/110420] [12/13/14 " pinskia at gcc dot gnu.org
2023-06-26 23:34 ` [Bug tree-optimization/110420] [12/13/14 Regression] internal compiler error: in gimple_redirect_edge_and_branch due to simple_dce_from_worklist removing `asm goto` pinskia at gcc dot gnu.org
2023-06-26 23:54 ` pinskia at gcc dot gnu.org
2023-06-27  0:10 ` pinskia at gcc dot gnu.org
2023-06-27  3:26 ` pinskia at gcc dot gnu.org
2023-06-27 10:50 ` jbglaw@lug-owl.de
2023-06-27 16:28 ` cvs-commit at gcc dot gnu.org
2023-06-27 16:29 ` [Bug tree-optimization/110420] [12/13 " 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:24 ` 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).