public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug pch/40715] New: SPU compiler does not work properly with precompiled headers
@ 2009-07-10 21:09 ryan dot sammartino at gmail dot com
2009-07-10 21:38 ` [Bug pch/40715] " pinskia at gcc dot gnu dot org
2009-10-14 4:02 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: ryan dot sammartino at gmail dot com @ 2009-07-10 21:09 UTC (permalink / raw)
To: gcc-bugs
The SPU compiler does not work properly with precompiled headers.
$ cat pch.h
#include <spu_intrinsics.h>
$ cat test.cpp
vec_float4 add(vec_float4 a, vec_float4 b)
{
return spu_add(a, b);
}
$ /opt/cell/toolchain/bin/spu-g++ -O3 pch.h -o pch.h.gch
$ /opt/cell/toolchain/bin/spu-g++ -O3 -include pch.h -S test.cpp
test.cpp: In function 'float __vector__ add(float __vector__, float
__vector__)':
test.cpp:3: error: insufficient arguments to overloaded function spu_add
test.cpp:4: confused by earlier errors, bailing out
However, if I delete pch.h.gch:
$ rm -f pch.h.gch
$ /opt/cell/toolchain/bin/spu-g++ -O3 -include pch.h -S test.cpp
it compiles as expected.
This behaviour is observed in:
$ /opt/cell/toolchain/bin/spu-g++ -v
Using built-in specs.
Target: spu
Configured with: ../configure --prefix=/opt/cell/toolchain --disable-shared
--disable-nls --disable-threads --disable-checking --with-headers
--enable-version-specific-runtime-libs --disable-libssp
--enable-languages=c,c++ --with-system-zlib --with-newlib --program-prefix=spu-
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=spu : (reconfigured)
../configure --prefix=/opt/cell/toolchain --disable-shared --disable-nls
--disable-threads --disable-checking --with-headers
--enable-version-specific-runtime-libs --disable-libssp
--enable-languages=c,c++ --with-system-zlib --with-newlib --program-prefix=spu-
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=spu
Thread model: single
gcc version 4.4.0 (GCC)
as well as
$ spu-g++ -v
Using built-in specs.
Target: spu
Configured with: ../toolchain/gcc/configure --prefix=/usr/lib/cell/toolchain
--libexecdir=/usr/lib/cell/toolchain/lib --mandir=/usr/lib/cell/toolchain/man
--infodir=/usr/lib/cell/toolchain/info --with-sysroot=/usr/lib/cell/sysroot
--disable-shared --disable-nls --disable-threads --disable-checking
--with-headers --enable-version-specific-runtime-libs --disable-libssp
--enable-languages=c,c++,fortran --with-system-zlib --with-newlib
--program-prefix=spu- --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=spu
Thread model: single
gcc version 4.1.1
though the output is different with 4.1.1:
$ spu-g++ -O3 -include pch.h -S test.cpp
test.cpp: In function 'float __vector__ add(float __vector__, float
__vector__)':
test.cpp:3: error: no matching function for call to 'spu_add(float __vector__&,
float __vector__&)'
/usr/lib/cell/toolchain/lib/gcc/spu/4.1.1/include/spu_internals.h:818: note:
candidates are: unsigned int __vector__ spu_add(unsigned int __vector__,
unsigned int __vector__)
/usr/lib/cell/toolchain/lib/gcc/spu/4.1.1/include/spu_internals.h:823: note:
int __vector__ spu_add(int __vector__, int __vector__)
/usr/lib/cell/toolchain/lib/gcc/spu/4.1.1/include/spu_internals.h:828: note:
short unsigned int __vector__ spu_add(short unsigned int
__vector__, short unsigned int __vector__)
/usr/lib/cell/toolchain/lib/gcc/spu/4.1.1/include/spu_internals.h:833: note:
short int __vector__ spu_add(short int __vector__, short int
__vector__)
/usr/lib/cell/toolchain/lib/gcc/spu/4.1.1/include/spu_internals.h:838: note:
float __vector__ spu_add(float __vector__, float __vector__)
/usr/lib/cell/toolchain/lib/gcc/spu/4.1.1/include/spu_internals.h:843: note:
double __vector__ spu_add(double __vector__, double __vector__)
/usr/lib/cell/toolchain/lib/gcc/spu/4.1.1/include/spu_internals.h:848: note:
short unsigned int __vector__ spu_add(short unsigned int
__vector__, short unsigned int)
/usr/lib/cell/toolchain/lib/gcc/spu/4.1.1/include/spu_internals.h:853: note:
short int __vector__ spu_add(short int __vector__, short int)
/usr/lib/cell/toolchain/lib/gcc/spu/4.1.1/include/spu_internals.h:858: note:
unsigned int __vector__ spu_add(unsigned int __vector__, unsigned
int)
/usr/lib/cell/toolchain/lib/gcc/spu/4.1.1/include/spu_internals.h:863: note:
int __vector__ spu_add(int __vector__, int)
test.cpp:4: confused by earlier errors, bailing out
--
Summary: SPU compiler does not work properly with precompiled
headers
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: pch
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ryan dot sammartino at gmail dot com
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: spu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40715
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug pch/40715] SPU compiler does not work properly with precompiled headers
2009-07-10 21:09 [Bug pch/40715] New: SPU compiler does not work properly with precompiled headers ryan dot sammartino at gmail dot com
@ 2009-07-10 21:38 ` pinskia at gcc dot gnu dot org
2009-10-14 4:02 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-07-10 21:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2009-07-10 21:38 -------
This was fixed in 4.5.0 I think.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40715
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug pch/40715] SPU compiler does not work properly with precompiled headers
2009-07-10 21:09 [Bug pch/40715] New: SPU compiler does not work properly with precompiled headers ryan dot sammartino at gmail dot com
2009-07-10 21:38 ` [Bug pch/40715] " pinskia at gcc dot gnu dot org
@ 2009-10-14 4:02 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-10-14 4:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2009-10-14 04:02 -------
*** This bug has been marked as a duplicate of 33505 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40715
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-14 4:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-10 21:09 [Bug pch/40715] New: SPU compiler does not work properly with precompiled headers ryan dot sammartino at gmail dot com
2009-07-10 21:38 ` [Bug pch/40715] " pinskia at gcc dot gnu dot org
2009-10-14 4:02 ` pinskia at gcc dot gnu dot 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).