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

            Bug ID: 95645
           Summary: Linux kernel regression "during GIMPLE pass:
                    adjust_alignment"
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: elver at google dot com
  Target Milestone: ---

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

With GCC at trunk (87af4f40453a9c84363bde5d9a58466de7fbee2e), compiling the
Linux kernel (v5.7, x86-64) fails for the following source file:

gcc -Wp,-MD,arch/x86/boot/.string.o.d  -nostdinc -isystem
/usr/local/google/home/elver/third_party/gcc/local/lib/gcc/x86_64-pc-linux-gnu/11.0.0/include
-I./arch/x86/include -I./arch/x86/include/generated  -I./include
-I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi
-I./include/generated/uapi -include ./include/linux/kconfig.h -include
./include/linux/compiler_types.h -D__KERNEL__ -m16 -g -Os
-DDISABLE_BRANCH_PROFILING -Wall -Wstrict-prototypes -march=i386 -mregparm=3
-fno-strict-aliasing -fomit-frame-pointer -fno-pic -mno-mmx -mno-sse
-ffreestanding -fno-stack-protector -Wno-address-of-packed-member
-mpreferred-stack-boundary=2 -D_SETUP -fmacro-prefix-map=./=
-fno-asynchronous-unwind-tables      -DKBUILD_MODFILE='"arch/x86/boot/string"'
-DKBUILD_BASENAME='"string"' -DKBUILD_MODNAME='"string"' -c -o
arch/x86/boot/string.o arch/x86/boot/string.c                                   
during GIMPLE pass: adjust_alignment                                            
arch/x86/boot/string.c: In function ‘simple_strtoull’:                          
arch/x86/boot/string.c:121:20: internal compiler error: in execute, at
adjust-alignment.c:74                                                           
  121 | unsigned long long simple_strtoull(const char *cp, char **endp,
unsigned int base)                                                              
      |                    ^~~~~~~~~~~~~~~                                      
0x7964a5 execute                                                                
        ../.././gcc/adjust-alignment.c:74 


This can be reproduced with the following command line and the attached
preprocessed source:

/usr/local/google/home/elver/third_party/gcc/local/bin/gcc  -nostdinc -m16 -g
-Os -Wall -Wstrict-prototypes -march=i386 -mregparm=3 -fno-strict-aliasing
-fomit-frame-pointer -fno-pic -mno-mmx -mno-sse -ffreestanding
-fno-stack-protector -Wno-address-o    f-packed-member
-mpreferred-stack-boundary=2 -fmacro-prefix-map=./=
-fno-asynchronous-unwind-tables -c -o /dev/null string-preprocessed.c

Reply via email to