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

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