public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vd.kraats at hccnet dot nl" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/109504] New: Compilation fails with pragma GCC target sse4.1 and immintrin.h
Date: Thu, 13 Apr 2023 18:58:00 +0000	[thread overview]
Message-ID: <bug-109504-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 109504
           Summary: Compilation fails with pragma GCC target sse4.1 and
                    immintrin.h
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vd.kraats at hccnet dot nl
  Target Milestone: ---

Problem occurs at Debian Bookworm (Testing) i686 (32 bit).
debian:~$ cat test.c
#pragma GCC target(&quot;sse4.1&quot;)
#include &lt;immintrin.h&gt;
int main(){return 0;}

debian:~$ gcc -v test.c 2&gt;&amp;1 | head -100
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/12/lto-wrapper
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion=&apos;Debian
12.2.0-14&apos; --with-bugurl=<span
style="color:#C01C28">file:///usr/share/doc/gcc-12/README.Bugs</span>
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-12
--program-prefix=i686-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new
--enable-gnu-unique-object --disable-vtable-verify --enable-plugin
--enable-default-pie --with-system-zlib --enable-libphobos-checking=release
--with-target-system-zlib=auto --enable-objc-gc=auto --enable-targets=all
--enable-multiarch --disable-werror --with-arch-32=i686
--with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic
--enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu
--target=i686-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Debian 12.2.0-14)
COLLECT_GCC_OPTIONS=&apos;-v&apos; &apos;-mtune=generic&apos;
&apos;-march=i686&apos; &apos;-dumpdir&apos; &apos;a-&apos;
 /usr/lib/gcc/i686-linux-gnu/12/cc1 -quiet -v -imultiarch i386-linux-gnu test.c
-quiet -dumpdir a- -dumpbase test.c -dumpbase-ext .c -mtune=generic -march=i686
-version -fasynchronous-unwind-tables -o /tmp/ccvTqsb4.s
GNU C17 (Debian 12.2.0-14) version 12.2.0 (i686-linux-gnu)
        compiled by GNU C version 12.2.0, GMP version 6.2.1, MPFR version
4.1.1-p1, MPC version 1.3.1, isl version isl-0.25-GMP

warning: MPFR header version 4.1.1-p1 differs from library version 4.2.0.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory &quot;/usr/local/include/i386-linux-gnu&quot;
ignoring nonexistent directory
&quot;/usr/lib/gcc/i686-linux-gnu/12/include-fixed&quot;
ignoring nonexistent directory
&quot;/usr/lib/gcc/i686-linux-gnu/12/../../../../i686-linux-gnu/include&quot;
#include &quot;...&quot; search starts here:
#include &lt;...&gt; search starts here:
 /usr/lib/gcc/i686-linux-gnu/12/include
 /usr/local/include
 /usr/include/i386-linux-gnu
 /usr/include
End of search list.
GNU C17 (Debian 12.2.0-14) version 12.2.0 (i686-linux-gnu)
        compiled by GNU C version 12.2.0, GMP version 6.2.1, MPFR version
4.1.1-p1, MPC version 1.3.1, isl version isl-0.25-GMP

warning: MPFR header version 4.1.1-p1 differs from library version 4.2.0.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: e1e0efc2c04a9ab28e35cf4254d1a7fe
In file included from /usr/lib/gcc/i686-linux-gnu/12/include/immintrin.h:98,
                 from test.c:2:
/usr/lib/gcc/i686-linux-gnu/12/include/avx512fp16intrin.h:38:9: error:
‘_Float16’ is not supported on this target
   38 | typedef _Float16 __v8hf __attribute__ ((__vector_size__ (16)));

This error should not be given.The current target  should be sse4.1,
because of the pragma. The error makes cross-compiling with a low target
machine (i686 in this case) not workable.

The  error only occurs at gcc-12, not at gcc-11. So this seeems to be
regression. The error disappears if compiling with option -msse2.

This error caused filezilla not being delivered anymore at latest upgrade of
Debian Bookworm.
I wrote bug-request https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034195 .

This problem was noticed before at Debian. But Debian blaimed Filezilla,
and Filezila blaimed Debian/GCC, because nothing was changed in this
area since previous release.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020327 and
https://trac.filezilla-project.org/ticket/12777 .

             reply	other threads:[~2023-04-13 18:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-13 18:58 vd.kraats at hccnet dot nl [this message]
2023-04-13 21:30 ` [Bug target/109504] " pinskia at gcc dot gnu.org
2023-04-14  6:32 ` crazylht at gmail dot com
2023-04-14  7:32 ` crazylht at gmail dot com
2023-04-14  7:38 ` [Bug target/109504] [12/13 Regression] " rguenth at gcc dot gnu.org
2023-04-14  8:01 ` jakub at gcc dot gnu.org
2023-04-14  8:17 ` jakub at gcc dot gnu.org
2023-04-17  6:37 ` crazylht at gmail dot com
2023-04-18  6:39 ` [Bug target/109504] [12/13/14 " crazylht at gmail dot com
2023-05-08 12:26 ` rguenth at gcc dot gnu.org
2023-07-19  1:36 ` cvs-commit at gcc dot gnu.org
2023-07-19  6:48 ` crazylht at gmail dot com
2023-11-30 10:52 ` liuhongt 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-109504-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).