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

            Bug ID: 108095
           Summary: powerpc-linux / powerpc64-linux: ICEs when building
                    Linux's arch/powerpc/kernel/align.c (asm goto)
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jbg...@lug-owl.de
  Target Milestone: ---

Created attachment 54085
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54085&action=edit
Minimized testcase

For a number of ppc32 builds (using various Linux kernel defconfig
configurations) as well as for one 64bit build, I get these:

[mk all 2022-12-11 21:36:22]   powerpc64-linux-gcc
-Wp,-MMD,arch/powerpc/kernel/.align.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 -DHAVE_AS_ATHIGH=1 -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 -std=gnu11
-mbig-endian -m64 -msoft-float -pipe -mtraceback=no -mabi=elfv1 -mcall-aixdesc
-mcmodel=medium -mno-pointers-to-nested-functions -mcpu=cell -mno-prefixed
-mno-pcrel -mno-altivec -mno-vsx -mno-mma -fno-asynchronous-unwind-tables
-mno-string -Wa,-maltivec -Wa,-mpower4 -Wa,-many -mabi=elfv1 -mcall-aixdesc
-mbig-endian -mstack-protector-guard=tls -mstack-protector-guard-reg=r13
-fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation
-Wno-format-overflow -Wno-address-of-packed-member -Os
-fno-allow-store-data-races -Wframe-larger-than=2048 -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-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=752 -Werror   
-DKBUILD_MODFILE='"arch/powerpc/kernel/align"' -DKBUILD_BASENAME='"align"'
-DKBUILD_MODNAME='"align"' -D__KBUILD_MODNAME=kmod_align -c -o
arch/powerpc/kernel/align.o arch/powerpc/kernel/align.c  
[mk all 2022-12-11 21:36:23] during GIMPLE pass: ccp
[mk all 2022-12-11 21:36:23] arch/powerpc/kernel/align.c: In function
'__copy_inst_from_kernel_nofault':
[mk all 2022-12-11 21:36:23] arch/powerpc/kernel/align.c:364:1: internal
compiler error: in maybe_register_def, at tree-into-ssa.cc:1948
[mk all 2022-12-11 21:36:23]   364 | }
[mk all 2022-12-11 21:36:23]       | ^
[mk all 2022-12-11 21:36:23] 0x19f12c6 internal_error(char const*, ...)
[mk all 2022-12-11 21:36:23]    ???:0
[mk all 2022-12-11 21:36:23] 0x7be8e0 fancy_abort(char const*, int, char
const*)
[mk all 2022-12-11 21:36:23]    ???:0
[mk all 2022-12-11 21:36:23] 0x17a985e dom_walker::walk(basic_block_def*)
[mk all 2022-12-11 21:36:23]    ???:0
[mk all 2022-12-11 21:36:23] 0xe99460 update_ssa(unsigned int)
[mk all 2022-12-11 21:36:23]    ???:0
[mk all 2022-12-11 21:36:23] 0x1041df9 execute_update_addresses_taken()
[mk all 2022-12-11 21:36:23]    ???:0
[mk all 2022-12-11 21:36:23] Please submit a full bug report, with preprocessed
source (by using -freport-bug).
[mk all 2022-12-11 21:36:23] Please include the complete backtrace with any bug
report.
[mk all 2022-12-11 21:36:23] See <https://gcc.gnu.org/bugs/> for instructions.


This seems to be also an asm goto issue, but it is _not_ fixed with the
7676235f690e624b7e commit. (This issue can still be reproduced with
2dc5d6b1e7e.)

Minimum command line to produce the ICE is: `powerpc64-linux-gcc -Os -g -c -o
align.o align.i`. Removing either `-Os` or `-g` silences it.

Reply via email to