public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/36837]  New: Return type of spu_splats is not deduced correctly
@ 2008-07-15 13:52 jadamcze at utas dot edu dot au
  2008-07-15 13:56 ` [Bug target/36837] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: jadamcze at utas dot edu dot au @ 2008-07-15 13:52 UTC (permalink / raw)
  To: gcc-bugs

For the following fragment :

#include <spu_intrinsics.h>
vector unsigned int f() {
        return spu_splats( (unsigned int)7 );
}


Compiling with spu-elf-gcc is fine.  Compiling with spu-elf-g++ generates an
error:

$ usr/bin/spu-elf-g++ -c splat.cpp
splat.cpp: In function 'unsigned int __vector__ f()':
splat.cpp:3: note: use -flax-vector-conversions to permit conversions between
vectors with differing element types or numbers of subparts
splat.cpp:3: error: cannot convert 'unsigned char __vector__' to 'unsigned int
__vector__' in return


Replacing spu_splats with __builtin_spu_splats_4 allows the fragment to be
compiled correctly.



Observed with r137813.  

Compiles as expected in :
gcc version 4.4.0 20080404 (experimental)
gcc version 4.3.0 20071012 (experimental)
gcc version 4.1.1 (IBM SDK 3.0 release)


-- 
           Summary: Return type of spu_splats is not deduced correctly
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jadamcze at utas dot edu dot au
GCC target triplet: spu-elf


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


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

* [Bug target/36837] Return type of spu_splats is not deduced correctly
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
@ 2008-07-15 13:56 ` pinskia at gcc dot gnu dot org
  2008-07-15 14:55 ` jadamcze at utas dot edu dot au
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-15 13:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-07-15 13:55 -------
Works for me with:
GNU C++ (GCC) version 4.4.0 20080711 (experimental) [trunk revision 137727]
(spu-elf)

So this has to be a very recent regression.


-- 


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


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

* [Bug target/36837] Return type of spu_splats is not deduced correctly
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
  2008-07-15 13:56 ` [Bug target/36837] " pinskia at gcc dot gnu dot org
@ 2008-07-15 14:55 ` jadamcze at utas dot edu dot au
  2008-07-15 14:57 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: jadamcze at utas dot edu dot au @ 2008-07-15 14:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jadamcze at utas dot edu dot au  2008-07-15 14:54 -------
I reverted to r137727 and rebuilt it all and still see the error.

Any obvious mistake in the following?

../gcc/configure --prefix=${HOME}/usr --enable-languages=c,c++ --with-newlib
--with-headers --target=spu-elf
make && make install

Other things I should check?


-- 


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


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

* [Bug target/36837] Return type of spu_splats is not deduced correctly
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
  2008-07-15 13:56 ` [Bug target/36837] " pinskia at gcc dot gnu dot org
  2008-07-15 14:55 ` jadamcze at utas dot edu dot au
@ 2008-07-15 14:57 ` pinskia at gcc dot gnu dot org
  2008-07-15 14:58 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-15 14:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-07-15 14:57 -------
These are the options I use:
--target=spu-elf --prefix=${HOME}/gcc-spu --with-mpfr=/usr/local --with-newlib
--enable-languages=c,c++,objc --with-headers


-- 


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


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

* [Bug target/36837] Return type of spu_splats is not deduced correctly
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
                   ` (2 preceding siblings ...)
  2008-07-15 14:57 ` pinskia at gcc dot gnu dot org
@ 2008-07-15 14:58 ` pinskia at gcc dot gnu dot org
  2008-07-15 15:50 ` jadamcze at utas dot edu dot au
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-15 14:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2008-07-15 14:58 -------
[apinski@dhcp-10-98-10-216 ~]$ ~/gcc-spu/bin/spu-elf-gcc t.cc -S -v
Using built-in specs.
Target: spu-elf
Configured with: /home/apinski/src/local/gcc/configure --target=spu-elf
--prefix=/home/apinski/gcc-spu --with-mpfr=/usr/local --with-newlib
--enable-languages=c,c++,objc --with-headers
Thread model: single
gcc version 4.4.0 20080711 (experimental) [trunk revision 137727] (GCC) 
COLLECT_GCC_OPTIONS='-S' '-v'
 /home/apinski/gcc-spu/libexec/gcc/spu-elf/4.4.0/cc1plus -quiet -v t.cc -quiet
-dumpbase t.cc -auxbase t -version -o t.s
ignoring nonexistent directory
"/home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/sys-include"
#include "..." search starts here:
#include <...> search starts here:

/home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include/c++/4.4.0

/home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include/c++/4.4.0/spu-elf

/home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include/c++/4.4.0/backward
 /home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/include
 /home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/include-fixed
 /home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include
End of search list.
GNU C++ (GCC) version 4.4.0 20080711 (experimental) [trunk revision 137727]
(spu-elf)
        compiled by GNU C version 4.1.0 20060304 (Red Hat 4.1.0-3), GMP version
4.2.1, MPFR version 2.2.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 6f14eb7742734115a119ca07da3cf037
COMPILER_PATH=/home/apinski/gcc-spu/libexec/gcc/spu-elf/4.4.0/:/home/apinski/gcc-spu/libexec/gcc/spu-elf/4.4.0/:/home/apinski/gcc-spu/libexec/gcc/spu-elf/:/home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/:/home/apinski/gcc-spu/lib/gcc/spu-elf/:/home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/bin/
LIBRARY_PATH=/home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/:/home/apinski/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/lib/
COLLECT_GCC_OPTIONS='-S' '-v'


-- 


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


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

* [Bug target/36837] Return type of spu_splats is not deduced correctly
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
                   ` (3 preceding siblings ...)
  2008-07-15 14:58 ` pinskia at gcc dot gnu dot org
@ 2008-07-15 15:50 ` jadamcze at utas dot edu dot au
  2008-07-15 15:54 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: jadamcze at utas dot edu dot au @ 2008-07-15 15:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jadamcze at utas dot edu dot au  2008-07-15 15:49 -------
Created an attachment (id=15912)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15912&action=view)
Preprocessed source

$ usr/bin/spu-elf-g++ splat.cpp -v
Using built-in specs.
Target: spu-elf
Configured with: ../gcc/configure --prefix=/home/jonathan/usr
--enable-languages=c,c++ --with-newlib --with-headers --target=spu-elf
Thread model: single
gcc version 4.4.0 20080711 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v'
 /home/jonathan/usr/libexec/gcc/spu-elf/4.4.0/cc1plus -quiet -v splat.cpp
-quiet -dumpbase splat.cpp -auxbase splat -version -o /tmp/ccxYOpg1.s
ignoring nonexistent directory
"/home/jonathan/usr/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /home/jonathan/usr/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include/c++/4.4.0

/home/jonathan/usr/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include/c++/4.4.0/spu-elf

/home/jonathan/usr/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include/c++/4.4.0/backward
 /home/jonathan/usr/lib/gcc/spu-elf/4.4.0/include
 /home/jonathan/usr/lib/gcc/spu-elf/4.4.0/include-fixed
 /home/jonathan/usr/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include
End of search list.
GNU C++ (GCC) version 4.4.0 20080711 (experimental) (spu-elf)
        compiled by GNU C version 4.3.1, GMP version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 0796f6f7f5d948d81ac2e84f3843bd7d
splat.cpp: In function 'unsigned int __vector__ f()':
splat.cpp:3: note: use -flax-vector-conversions to permit conversions between
vectors with differing element types or numbers of subparts
splat.cpp:3: error: cannot convert 'unsigned char __vector__' to 'unsigned int
__vector__' in return


-- 


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


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

* [Bug target/36837] Return type of spu_splats is not deduced correctly
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
                   ` (4 preceding siblings ...)
  2008-07-15 15:50 ` jadamcze at utas dot edu dot au
@ 2008-07-15 15:54 ` pinskia at gcc dot gnu dot org
  2008-07-15 15:57 ` jadamcze at utas dot edu dot au
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-15 15:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2008-07-15 15:54 -------
Maybe 4.3.1 is miscompiling GCC 4.4.0 here.


-- 


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


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

* [Bug target/36837] Return type of spu_splats is not deduced correctly
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
                   ` (5 preceding siblings ...)
  2008-07-15 15:54 ` pinskia at gcc dot gnu dot org
@ 2008-07-15 15:57 ` jadamcze at utas dot edu dot au
  2008-07-16  3:49 ` jadamcze at utas dot edu dot au
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: jadamcze at utas dot edu dot au @ 2008-07-15 15:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jadamcze at utas dot edu dot au  2008-07-15 15:56 -------
I tried a build using 4.2.4 - same problem.


-- 


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


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

* [Bug target/36837] Return type of spu_splats is not deduced correctly
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
                   ` (6 preceding siblings ...)
  2008-07-15 15:57 ` jadamcze at utas dot edu dot au
@ 2008-07-16  3:49 ` jadamcze at utas dot edu dot au
  2008-07-16  4:54 ` jadamcze at utas dot edu dot au
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 13+ messages in thread
From: jadamcze at utas dot edu dot au @ 2008-07-16  3:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jadamcze at utas dot edu dot au  2008-07-16 03:48 -------
Tried again building with 4.2.4 (and this time with no ccache :\)  Code
compiles as expected.  It appears that the 4.3.1 that I have has problems.

Trying again with fsf gcc-4.3.1.


-- 


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


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

* [Bug target/36837] Return type of spu_splats is not deduced correctly
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
                   ` (7 preceding siblings ...)
  2008-07-16  3:49 ` jadamcze at utas dot edu dot au
@ 2008-07-16  4:54 ` jadamcze at utas dot edu dot au
  2008-07-16  4:55 ` jadamcze at utas dot edu dot au
  2009-04-25 13:31 ` [Bug target/36837] x86_64 linux-gnu gcc miscompiles spu-elf gcc (4.4) jadamcze at utas dot edu dot au
  10 siblings, 0 replies; 13+ messages in thread
From: jadamcze at utas dot edu dot au @ 2008-07-16  4:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jadamcze at utas dot edu dot au  2008-07-16 04:54 -------
../gcc-4.3.1/configure --prefix=${HOME}/gcc-native/ --enable-languages=c
make && make install

CC=~/gcc-native/bin/gcc ../gcc/configure --prefix=${HOME}/gcc-spu
--enable-languages=c,c++ --with-newlib --with-headers --target=spu-elf
make -j4 CC=~/gcc-native/bin/gcc && make CC=~/gcc-native/bin/gcc install




$ gcc-spu/bin/spu-elf-g++ splat.cpp -c -v
Using built-in specs.
Target: spu-elf
Configured with: ../gcc/configure --prefix=/home/jonathan/gcc-spu
--enable-languages=c,c++ --with-newlib --with-headers --target=spu-elf
Thread model: single
gcc version 4.4.0 20080716 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-c' '-v'
 /home/jonathan/gcc-spu/libexec/gcc/spu-elf/4.4.0/cc1plus -quiet -v splat.cpp
-quiet -dumpbase splat.cpp -auxbase splat -version -o /tmp/ccTwlij4.s
ignoring nonexistent directory
"/home/jonathan/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/sys-include"
#include "..." search starts here:
#include <...> search starts here:

/home/jonathan/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include/c++/4.4.0

/home/jonathan/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include/c++/4.4.0/spu-elf

/home/jonathan/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include/c++/4.4.0/backward
 /home/jonathan/gcc-spu/lib/gcc/spu-elf/4.4.0/include
 /home/jonathan/gcc-spu/lib/gcc/spu-elf/4.4.0/include-fixed
 /home/jonathan/gcc-spu/lib/gcc/spu-elf/4.4.0/../../../../spu-elf/include
End of search list.
GNU C++ (GCC) version 4.4.0 20080716 (experimental) (spu-elf)
        compiled by GNU C version 4.3.1, GMP version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: b3d5544b58f1447fbeb69330a4fd2dff
splat.cpp: In function 'unsigned int __vector__ f()':
splat.cpp:3: note: use -flax-vector-conversions to permit conversions between
vectors with differing element types or numbers of subparts
splat.cpp:3: error: cannot convert 'unsigned char __vector__' to 'unsigned int
__vector__' in return


-- 


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


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

* [Bug target/36837] Return type of spu_splats is not deduced correctly
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
                   ` (8 preceding siblings ...)
  2008-07-16  4:54 ` jadamcze at utas dot edu dot au
@ 2008-07-16  4:55 ` jadamcze at utas dot edu dot au
  2009-04-25 13:31 ` [Bug target/36837] x86_64 linux-gnu gcc miscompiles spu-elf gcc (4.4) jadamcze at utas dot edu dot au
  10 siblings, 0 replies; 13+ messages in thread
From: jadamcze at utas dot edu dot au @ 2008-07-16  4:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jadamcze at utas dot edu dot au  2008-07-16 04:55 -------
In other words, gcc-4.3.1 creates a wrong-functioning spu-elf-g++


-- 


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


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

* [Bug target/36837] x86_64 linux-gnu gcc miscompiles spu-elf gcc (4.4)
  2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
                   ` (9 preceding siblings ...)
  2008-07-16  4:55 ` jadamcze at utas dot edu dot au
@ 2009-04-25 13:31 ` jadamcze at utas dot edu dot au
  10 siblings, 0 replies; 13+ messages in thread
From: jadamcze at utas dot edu dot au @ 2009-04-25 13:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jadamcze at utas dot edu dot au  2009-04-25 13:31 -------
*** Bug 39887 has been marked as a duplicate of this bug. ***


-- 


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


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

* [Bug target/36837] x86_64 linux-gnu gcc miscompiles spu-elf gcc (4.4)
       [not found] <bug-36837-4@http.gcc.gnu.org/bugzilla/>
@ 2021-05-31  1:04 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-05-31  1:04 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
   Target Milestone|---                         |10.0
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
spu as a target has been removed since GCC 10.

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

end of thread, other threads:[~2021-05-31  1:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-15 13:52 [Bug target/36837] New: Return type of spu_splats is not deduced correctly jadamcze at utas dot edu dot au
2008-07-15 13:56 ` [Bug target/36837] " pinskia at gcc dot gnu dot org
2008-07-15 14:55 ` jadamcze at utas dot edu dot au
2008-07-15 14:57 ` pinskia at gcc dot gnu dot org
2008-07-15 14:58 ` pinskia at gcc dot gnu dot org
2008-07-15 15:50 ` jadamcze at utas dot edu dot au
2008-07-15 15:54 ` pinskia at gcc dot gnu dot org
2008-07-15 15:57 ` jadamcze at utas dot edu dot au
2008-07-16  3:49 ` jadamcze at utas dot edu dot au
2008-07-16  4:54 ` jadamcze at utas dot edu dot au
2008-07-16  4:55 ` jadamcze at utas dot edu dot au
2009-04-25 13:31 ` [Bug target/36837] x86_64 linux-gnu gcc miscompiles spu-elf gcc (4.4) jadamcze at utas dot edu dot au
     [not found] <bug-36837-4@http.gcc.gnu.org/bugzilla/>
2021-05-31  1:04 ` pinskia at gcc dot gnu.org

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