https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72864
Bug ID: 72864 Summary: gcc.c-torture/compile/pr72802.c fails on x86_64-apple-darwin15 with -m32 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dominiq at lps dot ens.fr CC: amodra at gcc dot gnu.org, iains at gcc dot gnu.org Target Milestone: --- Host: x86_64-apple-darwin15 Target: x86_64-apple-darwin15 Build: x86_64-apple-darwin15 The test gcc.c-torture/compile/pr72802.c fails on x86_64-apple-darwin15 with -m32 Running target unix/-m32 FAIL: gcc.c-torture/compile/pr72802.c -O0 (test for excess errors) FAIL: gcc.c-torture/compile/pr72802.c -O1 (test for excess errors) FAIL: gcc.c-torture/compile/pr72802.c -O2 (test for excess errors) FAIL: gcc.c-torture/compile/pr72802.c -O2 -flto (test for excess errors) FAIL: gcc.c-torture/compile/pr72802.c -O2 -flto -flto-partition=none (test for excess errors) FAIL: gcc.c-torture/compile/pr72802.c -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions (test for excess errors) FAIL: gcc.c-torture/compile/pr72802.c -O3 -g (test for excess errors) FAIL: gcc.c-torture/compile/pr72802.c -Os (test for excess errors) The error is [book15] f90/bug% gcc-fsf-6 /opt/gcc/_clean/gcc/testsuite/gcc.c-torture/compile/pr72802.c -w -c -m32 /var/folders/8q/sh_swgz96r7f5vnn08f7fxr00000gn/T//cc30nAcT.s:152:2: error: symbol '_a' can not be undefined in a subtraction expression leal _a-L3$pb(%ebx), %eax ^ with all the gcc versions I have tried from 4.8 up to trunk (7.0), i.e. latent bug. Compiling with clang, Apple LLVM version 7.3.0 (clang-703.0.31), I get /opt/gcc/_clean/gcc/testsuite/gcc.c-torture/compile/pr72802.c:53:5: error: non-void function 'fn3' should return a value [-Wreturn-type] return; ^ 1 error generated.