public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53784] New: Scalar vector binary operation - error with -std=c9x/c1x
@ 2012-06-27  5:40 dag at nimrod dot no
  2012-06-27  5:42 ` [Bug c/53784] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dag at nimrod dot no @ 2012-06-27  5:40 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53784

             Bug #: 53784
           Summary: Scalar vector binary operation - error with
                    -std=c9x/c1x
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dag@nimrod.no


Test code:
----------
typedef float v8sf __attribute__ ((vector_size (4*8)));

v8sf add_scalar(v8sf v, float s)
{
  return v + s;
}
----------

If any non-GNU language standard is chosen (e.g. gcc -std=c99 -mavx -S test.c),
the compilation fails with the following error:

error: conversion of scalar to vector involves truncation

As far as I can tell, there should not be any truncation involved here.

Adding -ffast-math makes gcc accept the code.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c/53784] Scalar vector binary operation - error with -std=c9x/c1x
  2012-06-27  5:40 [Bug c/53784] New: Scalar vector binary operation - error with -std=c9x/c1x dag at nimrod dot no
@ 2012-06-27  5:42 ` pinskia at gcc dot gnu.org
  2012-06-27  6:12 ` dag at nimrod dot no
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-06-27  5:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53784

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-06-27 05:42:16 UTC ---
This is most likely due to -fexcess-precision= handling.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c/53784] Scalar vector binary operation - error with -std=c9x/c1x
  2012-06-27  5:40 [Bug c/53784] New: Scalar vector binary operation - error with -std=c9x/c1x dag at nimrod dot no
  2012-06-27  5:42 ` [Bug c/53784] " pinskia at gcc dot gnu.org
@ 2012-06-27  6:12 ` dag at nimrod dot no
  2012-08-01  6:29 ` [Bug c/53784] Scalar vector binary operation - compilation fails with -std=c90/c99/c11 (-fexcess-precision=standard) dag at nimrod dot no
  2020-09-04  0:10 ` [Bug target/53784] " evan@coeus-group.com
  3 siblings, 0 replies; 5+ messages in thread
From: dag at nimrod dot no @ 2012-06-27  6:12 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53784

--- Comment #2 from Dag Lem <dag at nimrod dot no> 2012-06-27 06:12:37 UTC ---
Yes, gcc -fexcess-precision=standard -mavx -S test.c triggers the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c/53784] Scalar vector binary operation - compilation fails with -std=c90/c99/c11 (-fexcess-precision=standard)
  2012-06-27  5:40 [Bug c/53784] New: Scalar vector binary operation - error with -std=c9x/c1x dag at nimrod dot no
  2012-06-27  5:42 ` [Bug c/53784] " pinskia at gcc dot gnu.org
  2012-06-27  6:12 ` dag at nimrod dot no
@ 2012-08-01  6:29 ` dag at nimrod dot no
  2020-09-04  0:10 ` [Bug target/53784] " evan@coeus-group.com
  3 siblings, 0 replies; 5+ messages in thread
From: dag at nimrod dot no @ 2012-08-01  6:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53784

Dag Lem <dag at nimrod dot no> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |i686-redhat-linux

--- Comment #3 from Dag Lem <dag at nimrod dot no> 2012-08-01 06:29:30 UTC ---
The bug can not be reproduced on x86_64, only on i386.

gcc -v from Fedora 17 i386:

Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-redhat-linux/4.7.0/lto-wrapper
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --disable-build-with-cxx
--disable-build-poststage1-with-cxx --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object
--enable-linker-build-id --with-linker-hash-style=gnu
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin
--enable-initfini-array --enable-java-awt=gtk --disable-dssi
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-ppl --with-cloog --with-tune=generic --with-arch=i686
--build=i686-redhat-linux
Thread model: posix
gcc version 4.7.0 20120507 (Red Hat 4.7.0-5) (GCC)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/53784] Scalar vector binary operation - compilation fails with -std=c90/c99/c11 (-fexcess-precision=standard)
  2012-06-27  5:40 [Bug c/53784] New: Scalar vector binary operation - error with -std=c9x/c1x dag at nimrod dot no
                   ` (2 preceding siblings ...)
  2012-08-01  6:29 ` [Bug c/53784] Scalar vector binary operation - compilation fails with -std=c90/c99/c11 (-fexcess-precision=standard) dag at nimrod dot no
@ 2020-09-04  0:10 ` evan@coeus-group.com
  3 siblings, 0 replies; 5+ messages in thread
From: evan@coeus-group.com @ 2020-09-04  0:10 UTC (permalink / raw)
  To: gcc-bugs

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

Evan Nemerson <evan@coeus-group.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |evan@coeus-group.com

--- Comment #4 from Evan Nemerson <evan@coeus-group.com> ---
This also occurs on s390x.  Just like ot i686, -std=c99 or
-fexcess-precision=standard triggers it.

U

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-04  0:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-27  5:40 [Bug c/53784] New: Scalar vector binary operation - error with -std=c9x/c1x dag at nimrod dot no
2012-06-27  5:42 ` [Bug c/53784] " pinskia at gcc dot gnu.org
2012-06-27  6:12 ` dag at nimrod dot no
2012-08-01  6:29 ` [Bug c/53784] Scalar vector binary operation - compilation fails with -std=c90/c99/c11 (-fexcess-precision=standard) dag at nimrod dot no
2020-09-04  0:10 ` [Bug target/53784] " evan@coeus-group.com

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).