From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4B6993858CDA; Tue, 16 Aug 2022 13:29:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B6993858CDA From: "pivanov at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106642] New: cc1 compiler hangs when cross-compiling ring_buffer.c (from kernel/events) on Aarch64 Date: Tue, 16 Aug 2022 13:29:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: pivanov at hotmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2022 13:29:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106642 Bug ID: 106642 Summary: cc1 compiler hangs when cross-compiling ring_buffer.c (from kernel/events) on Aarch64 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: pivanov at hotmail dot com Target Milestone: --- Compiler hangs forever and consumes all available memory when cross-compili= ng android kernel tree. The file that it hangs on is kernel/events/ring_buffer.c You may find the preprocessed ring_buffer.i attached. Compiler version and flags (source code checked out @ commit 1c596391e): https://gcc.gnu.org/git/?p=3Dgcc.git;a=3Dcommit;h=3D1c596391e150a6b0c55960c= 1c1cf1da76ea78230 ------------------------------------------------------------------------ /storage/gcc-arm64/bin/aarch64-elf-gcc -v Using built-in specs. COLLECT_GCC=3D/storage/gcc-arm64/bin/aarch64-elf-gcc COLLECT_LTO_WRAPPER=3D/storage/gcc-arm64/bin/../libexec/gcc/aarch64-elf/13.= 0.0/lto-wrapper Target: aarch64-elf Configured with: ../gcc/configure --target=3Daarch64-elf CFLAGS=3D'-flto -flto-compression-level=3D10 -O3 -pipe -ffunction-sections -fdata-sections' CXXFLAGS=3D'-flto -flto-compression-level=3D10 -O3 -pipe -ffunction-sections -fdata-sections' --prefix=3D/storage/gcc-arm64 --disable-decimal-float --disable-gcov --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libstdcxx-pch --disable-nls --disable-shared --disable-docs --enable-default-ssp --enable-languages=3Dc,c++ --enable-threads=3Dposix --with-pkgversion=3D'Eva GCC' --with-newlib --with= -gnu-as --with-gnu-ld --with-linker-hash-style=3Dgnu --with-sysroot --with-headers=3D/usr/include Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 13.0.0 20220816 (Bleeding Edge) (Eva GCC) Command line used that hangs compiler: ---------------------------------------- /storage/gcc-arm64/bin/aarch64-elf-gcc -Wp,-MD,kernel/events/.ring_buffer.o= .d -nostdinc -isystem /ext/gcc-arm64-gcc-master/bin/../lib/gcc/aarch64-elf/13.0.0/include -I../arch/arm64/include -I./arch/arm64/include/generated -I../include -I./include -I../arch/arm64/include/uapi -I./arch/arm64/include/generated/u= api -I../include/uapi -I./include/generated/uapi -include ../include/linux/kconfig.h -I../kernel/events -Ikernel/events -D__KERNEL__ -mlittle-endian -DKASAN_SHADOW_SCALE_SHIFT=3D3 -Wall -Wundef -Wstrict-proto= types -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=3Dgnu89 -fn= o-PIE -fno-gcse -mgeneral-regs-only -DCONFIG_AS_LSE=3D1 -DCONFIG_VDSO32=3D1 -fno-asynchronous-unwind-tables -fno-pic -mabi=3Dlp64 -DCONFIG_ARCH_SUPPORTS_INT128 -DKASAN_SHADOW_SCALE_SHIFT=3D3 -O3 -mcpu=3Dcortex-a76.cortex-a55+crypto+crc+lse+fp16+rcpc+rdma+dotprod -mtune=3Dcortex-a76.cortex-a55 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -fdevirtualize-at-ltrans -fipa-pta -fno-plt -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -Wno-address-of-packed-member -Wno-attribute-alias -O3 -mcpu=3Dcortex-a76.cortex-a55+crypto+crc+lse+fp16+rcpc+rdma+dotprod -mtune=3Dcortex-a76.cortex-a55 -fgraphite-identity -floop-nest-optimize -fno-semantic-interposition -fdevirtualize-at-ltrans -fipa-pta -fno-plt -fno-allow-store-data-races -DCC_HAVE_ASM_GOTO -fstack-protector-strong -fno-delete-null-pointer-checks -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-ca= lls -fno-var-tracking-assignments -ffunction-sections -fdata-sections -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -Wno-zero-length-bounds -Wno-array-bounds -Wno-stringop-overflow -Wno-restr= ict -Wno-maybe-uninitialized -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -Werror=3Dimplicit-int -Werror=3Dstrict-prototypes -Werror=3Ddate-time -Werror=3Dincompatible-poin= ter-types -Werror=3Ddesignated-init -fmacro-prefix-map=3D../=3D -fgcse-sm -Wno-packed-not-aligned -DKBUILD_BASENAME=3D'"ring_buffer"'=20 -DKBUILD_MODNAME=3D'"ring_buffer"' -c -o kernel/events/ring_buffer.o ../kernel/events/ring_buffer.c -------------------------------------------- The same command line hangs on the attached preprocessed file (ring_buffer.= i) so the bug should be fully reproducible. I did try to alter options from the command line above but couldn't make it= to compile no matter what options have been removed.=