public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "thiago.bauermann at linaro dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113611] New: [14 Regression] gcc.dg/pr110279-1.c fails on cross build since gcc-14-5779-g746344dd538
Date: Fri, 26 Jan 2024 04:29:07 +0000	[thread overview]
Message-ID: <bug-113611-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 113611
           Summary: [14 Regression] gcc.dg/pr110279-1.c fails on cross
                    build since gcc-14-5779-g746344dd538
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thiago.bauermann at linaro dot org
                CC: dizhao at os dot amperecomputing.com
  Target Milestone: ---
            Target: arm-linux-gnueabihf

After commit g:746344dd5380 ("swap ops in reassoc to reduce cross backedge
FMA") the following failure started appearing on cross builds of 32 bits Arm:

Running gcc:gcc.dg/dg.exp ...
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3

We're seeing it with toolchains built with --host=x86_64-linux-gnu and targets
arm-linux-gnueabihf and arm-none-eabi. Both targets with and without
--with-mode=thumb.

Interestingly, with a native compiler (with --host=arm-linux-gnueabihf and
--target=arm-linux-gnueabihf) I can't reproduce the problem.

I tested on today's trunk (commit ffeab69e1ffc) and the failures are still
present.

Here's how to reproduce on an x86_64-linux machine with
--target=arm-linux-gnueabihf:

1. Build and install GCC:

$ ~/src/gcc/configure" \
    SHELL=/bin/bash \
    --with-gnu-as \
    --with-gnu-ld \
    --disable-libmudflap \
    --enable-lto \
    --enable-shared \
    --without-included-gettext \
    --enable-nls \
    --with-system-zlib \
    --disable-sjlj-exceptions \
    --enable-gnu-unique-object \
    --enable-linker-build-id \
    --disable-libstdcxx-pch \
    --enable-c99 \
    --enable-clocale=gnu \
    --enable-libstdcxx-debug \
    --enable-long-long \
    --with-cloog=no \
    --with-ppl=no \
    --with-isl=no \
    --disable-multilib \
    --with-float=hard \
    --with-fpu=vfpv3-d16 \
    --with-tune=cortex-a9 \
    --with-arch=armv7-a \
    --enable-threads=posix \
    --enable-multiarch \
    --enable-libstdcxx-time=yes \
    --enable-gnu-indirect-function \
    --with-sysroot=/var/tmp/sysroot-arm-linux-gnueabihf \
    --enable-checking=yes \
    --disable-bootstrap \
    --enable-languages=default \
    --prefix=/tmp/arm-linux-gnueabihf \
    --build=x86_64-pc-linux-gnu \
    --host=x86_64-pc-linux-gnu \
    --target=arm-linux-gnueabihf \
&& make \
        SHELL=/bin/bash \
        -w \
        -j $(nproc) \
        CFLAGS_FOR_BUILD="-pipe -g -O2" \
        CXXFLAGS_FOR_BUILD="-pipe -g -O2" \
        LDFLAGS_FOR_BUILD="-static-libgcc" \
        MAKEINFOFLAGS=--force \
        BUILD_INFO="" \
        MAKEINFO=echo \
&& make install

2. Finally, use it to compile the problematic .c file:

$ /tmp/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
/home/bauermann/src/gcc/gcc/testsuite/gcc.dg/pr110279-1.c
-fdiagnostics-plain-output -Ofast --param avoid-fma-max-bits=512 --param
tree-reassoc-width=4 -fdump-tree-widening_mul-details -S -o pr110279-1.s
$ grep "Generated FMA" pr110279-1.c.215t.widening_mul || echo FAIL
FAIL

             reply	other threads:[~2024-01-26  4:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26  4:29 thiago.bauermann at linaro dot org [this message]
2024-01-26  4:32 ` [Bug testsuite/113611] " pinskia at gcc dot gnu.org
2024-01-31 14:33 ` rguenth at gcc dot gnu.org
2024-03-05 16:48 ` rearnsha at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-113611-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).