[Bug target/89626] Extraneous error message when compiling vector __int128

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

Segher Boessenkool  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-03-07
   Assignee|unassigned at gcc dot gnu.org  |segher at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #11 from Segher Boessenkool  ---
I'll take this.

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

--- Comment #10 from Segher Boessenkool  ---
But it behaves exactly likes this on LE ELFv2 systems as well.

Only explicitly signed and unsigned types are documented, sure, but that
does not make all that much sense, IMO.

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

--- Comment #9 from Bill Schmidt  ---
vector __int128 is equivalent to vector signed __int128, and only is defined
for the ELFv2 ABI.  Technically ELFv2 can be used anywhere, but in practice it
is little-endian only.LE systems require a minimum of POWER8.

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread seurer at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

seurer at gcc dot gnu.org changed:

   What|Removed |Added

 CC||seurer at gcc dot gnu.org

--- Comment #8 from seurer at gcc dot gnu.org ---
Segher, when we were cleaning up the ABI documentation one of the things we did
is to always explicitly use unsigned and signed.  The current ABI lists only
the explicit signed/unsigned types as being valid.  See table 2.12 for
instance.

If I recall correctly there were some problems we had seen without "signed"
precisely because of how "vector" is handled by the preprocessor.

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

--- Comment #7 from Jakub Jelinek  ---
If vector followed by __int128 is unconditionally mapped to __vector, then so
should vector double.

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

--- Comment #6 from Segher Boessenkool  ---
"vector signed __int128" and "vector unsigned __int128" are both defined,
and both work fine.  But "vector __int128" is not defined in the ABI, and
does not work unless you are building for power8 or up.

Bill, what should the ABI say about this?

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
  if (rid_code == RID_UNSIGNED || rid_code == RID_LONG
  || rid_code == RID_SHORT || rid_code == RID_SIGNED
  || rid_code == RID_INT || rid_code == RID_CHAR
  || rid_code == RID_FLOAT
  || (rid_code == RID_DOUBLE && TARGET_VSX)
  || (rid_code == rid_int128 () && TARGET_VADDUQM))

Seems like this is intentional, vector double not allowed without -mvsx and
vector __int128 without power8.

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

--- Comment #4 from Segher Boessenkool  ---
If you use -mcpu=power8 (or up) it works fine.

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

--- Comment #3 from Andrew Pinski  ---
Looks like the preprocess conditional identifier does not recognize __int128 as
something it should be used with vector.

I doubt this is a real bug as vector __int128 is not defined in the PowerPC
specifications.

vector unsigned __int128
is accepted by accident really, recongizing unsigned as something vector can
come beforehand.

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

kelvin at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kelvin at gcc dot gnu.org,
   ||segher at gcc dot gnu.org,
   ||wschmidt at gcc dot gnu.org

--- Comment #2 from kelvin at gcc dot gnu.org ---
The command line and error messages follow:

kelvin@bns:~/gcc/tests> echo $GCC_BUILD
/home/kelvin/gcc/build/gcc-trunk487532.b4patch
kelvin@bns:~/gcc/tests> make vector__int128.pp.s
$GCC_BUILD/gcc/xgcc -B$GCC_BUILD/gcc/ -S -mvsx -m64 -o vector__int128.pp.s
vector__int128.pp.c
vector__int128.c:39:14: error: unknown type name ‘vector’
   39 | __int128 e0 (vector __int128 v)
  |  ^~
vector__int128.c: In function ‘main’:
vector__int128.c:45:3: error: ‘vector’ undeclared (first use in this function)
   45 |   vector __int128 dv = { CONST0 };
  |   ^~
vector__int128.c:45:3: note: each undeclared identifier is reported only once
for each function it appears in
vector__int128.c:45:9: error: expected ‘;’ before ‘__int128’
   45 |   vector __int128 dv = { CONST0 };
  | ^
  | ;
vector__int128.c:48:7: warning: implicit declaration of function ‘e0’; did you
mean ‘u0’? [-Wimplicit-function-declaration]
   48 |   d = e0 (dv);
  |   ^~
  |   u0
vector__int128.c:48:11: error: ‘dv’ undeclared (first use in this function);
did you mean ‘d’?
   48 |   d = e0 (dv);
  |   ^~
  |   d
make: *** [vector__int128.pp.s] Error 1

[Bug target/89626] Extraneous error message when compiling vector __int128

2019-03-07 Thread kelvin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89626

--- Comment #1 from kelvin at gcc dot gnu.org ---
Created attachment 45923
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45923&action=edit
preprocessed source code for reproducer