porting problem again: ICE in add_clobbers

2007-09-18 Thread Tomas Svensson
I am still porting gcc v4.1.2 to a new risc architecture, and this time my problem is that when compiling with -O2 turned on, every insn with a (use ..) side effect expression, eg. (define_expand "sibcall" [(parallel [(call (match_operand 0 "" "") (match_operand 1 "" ""))

Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Jie Zhang
libstdc++ tries to avoid link tests when configured with newlib. But I saw this when working on bfin port gcc: checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... no checking how to hardcode library paths into programs... immediate checking for shl

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Bernd Schmidt
Jie Zhang wrote: libstdc++ tries to avoid link tests when configured with newlib. But I saw this when working on bfin port gcc: checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... no checking how to hardcode library paths into programs... immediat

Signed division with rounding towards -infinity (and floating point rounding)

2007-09-18 Thread Christopher Key
Hello, Apologies if this has already been covered; I've searched the archives and not found anything. I have some code that needs to perform signed division by a power of two with rounding towards minus infinity, i.e. it requires an arithmetic right shift. Now in the C specification, right shift

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Jie Zhang
Bernd Schmidt wrote: Jie Zhang wrote: libstdc++ tries to avoid link tests when configured with newlib. But I saw this when working on bfin port gcc: checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... no checking how to hardcode library paths int

Re: Signed division with rounding towards -infinity (and floating point rounding)

2007-09-18 Thread Tim Prince
Christopher Key wrote: > I have some code that needs to perform signed division by a power of two > with rounding towards minus infinity, i.e. it requires an arithmetic > right shift. Now in the C specification, right shifting a signed > integer is implementation defined. Because C may be compil

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Jie Zhang
Bernd Schmidt wrote: Jie Zhang wrote: But by design if gcc_no_link = no, link tests should be avoided. ??? I would have thought gcc_no_link = yes means link tests are avoided. Oops, I meant gcc_no_link = yes. Jie

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Bernd Schmidt
Jie Zhang wrote: But by design if gcc_no_link = no, link tests should be avoided. ??? I would have thought gcc_no_link = yes means link tests are avoided. Bernd -- This footer brought to you by insane German lawmakers. Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Bernd Schmidt
Jie Zhang wrote: Bernd Schmidt wrote: Jie Zhang wrote: But by design if gcc_no_link = no, link tests should be avoided. ??? I would have thought gcc_no_link = yes means link tests are avoided. Oops, I meant gcc_no_link = yes. Stupid double negatives. Okay, so then your problem is that g

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Daniel Jacobowitz
On Tue, Sep 18, 2007 at 03:27:18PM +0200, Bernd Schmidt wrote: > Jie Zhang wrote: > > Bernd Schmidt wrote: > >> Jie Zhang wrote: > >>> But by design if gcc_no_link = no, link tests should be avoided. > >> > >> ??? I would have thought gcc_no_link = yes means link tests are avoided. > >> > > Oops, I

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Jie Zhang
Rask Ingemann Lambertsen wrote: On Tue, Sep 18, 2007 at 07:55:45PM +0800, Jie Zhang wrote: libstdc++ tries to avoid link tests when configured with newlib. But I saw this when working on bfin port gcc: From config.log: /home/rask/build/gcc-bfin-unknown-elf/gcc/../ld/ld-new: cannot open linke

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Rask Ingemann Lambertsen
On Tue, Sep 18, 2007 at 07:55:45PM +0800, Jie Zhang wrote: > libstdc++ tries to avoid link tests when configured with newlib. But I > saw this when working on bfin port gcc: >From config.log: /home/rask/build/gcc-bfin-unknown-elf/gcc/../ld/ld-new: cannot open linker script file bf532.ld: No such f

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Bernd Schmidt
Jie Zhang wrote: Bernd Schmidt wrote: Jie Zhang wrote: Bernd Schmidt wrote: Jie Zhang wrote: But by design if gcc_no_link = no, link tests should be avoided. ??? I would have thought gcc_no_link = yes means link tests are avoided. Oops, I meant gcc_no_link = yes. Stupid double negativ

Two quick C++ performace inquiries

2007-09-18 Thread Ioannis Gyftos
Hello, I assume that this is the correct mailing list to ask this, as opposed to a Cpp list, since it appears to me that this is compiler-related. 1) class foo { int priv; public: void bar(); }; Supposing i am writing the definition of foo::bar, and i want to change the private

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Jie Zhang
Daniel Jacobowitz wrote: On Tue, Sep 18, 2007 at 03:27:18PM +0200, Bernd Schmidt wrote: Jie Zhang wrote: Bernd Schmidt wrote: Jie Zhang wrote: But by design if gcc_no_link = no, link tests should be avoided. ??? I would have thought gcc_no_link = yes means link tests are avoided. Oops, I m

RE: Two quick C++ performace inquiries

2007-09-18 Thread Dave Korn
On 18 September 2007 14:59, Ioannis Gyftos wrote: > Hello, > > I assume that this is the correct mailing list to ask this, as opposed > to a Cpp list, since it appears to me that this is compiler-related. But this isn't a mailing list for general how-to-use-the compiler questions, this is a ma

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Jie Zhang
Bernd Schmidt wrote: Jie Zhang wrote: Bernd Schmidt wrote: Jie Zhang wrote: But by design if gcc_no_link = no, link tests should be avoided. ??? I would have thought gcc_no_link = yes means link tests are avoided. Oops, I meant gcc_no_link = yes. Stupid double negatives. Okay, so then y

Re: porting problem again: ICE in add_clobbers

2007-09-18 Thread Tomas Svensson
I have investigated it further, and thought I'd add it to my question. I have tried compiling with all optimization flags turned on manually (list included below) and that compiles just fine. That leads me to think that what is causing the bug is some undocumented optimization, triggered only if o

Re: porting problem again: ICE in add_clobbers

2007-09-18 Thread Ian Lance Taylor
"Tomas Svensson" <[EMAIL PROTECTED]> writes: > I am still porting gcc v4.1.2 to a new risc architecture, and this > time my problem is that when compiling with -O2 turned on, every insn > with a (use ..) side effect expression, eg. > > (define_expand "sibcall" > [(parallel [(call (match_operand

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Jie Zhang
Bernd Schmidt wrote: Jie Zhang wrote: bfin-elf-gcc -mfdpic failed to link a simple test case because code is put into L1 instruction sram and data is put into L1 data sram, but Blackfin immediate offset load instruction cannot access GOT since the gap between instruction sram and data sram is

Newbie questions about gcc / glibc

2007-09-18 Thread Frederich, Eric P21322
Hello, I have a bunch of command line programs and I am trying to support Windows, Linux and an older version of Solaris. I got the same version of gcc working on all 3 platforms. Now the problem is that I can't get getopt_long to work which is provided by getopt.h. I don't know much about how al

Re: Newbie questions about gcc / glibc

2007-09-18 Thread DJ Delorie
> I saw getopt.h, getopt.c, and getopt1.c in my gcc directory under > libiberty. What are these for? Those are for building gcc itself. They're not normally used by applications, unless you want to import all of libiberty into your application. Normally, glibc provides the getopt family of fun

Re: Newbie questions about gcc / glibc

2007-09-18 Thread Ian Lance Taylor
"Frederich, Eric P21322" <[EMAIL PROTECTED]> writes: > I have a bunch of command line programs and I am trying to support > Windows, Linux and an older version of Solaris. > I got the same version of gcc working on all 3 platforms. > > Now the problem is that I can't get getopt_long to work which

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Rask Ingemann Lambertsen
On Tue, Sep 18, 2007 at 10:19:37PM +0800, Jie Zhang wrote: > Rask Ingemann Lambertsen wrote: > >The file bf532.ld is nowhere to be found in gcc or newlib/libgloss. > > > I have not pushed out our recent newlib/libgloss changes to upstream > yet. Currently you could get latest blackfin port newlib/

Re: Signed division with rounding towards -infinity (and floating point rounding)

2007-09-18 Thread Christopher Key
Tim Prince wrote: > Christopher Key wrote: > > >> I have some code that needs to perform signed division by a power of two >> with rounding towards minus infinity, i.e. it requires an arithmetic >> right shift. Now in the C specification, right shifting a signed >> integer is implementation def

Re: porting problem again: ICE in add_clobbers

2007-09-18 Thread Jim Wilson
Tomas Svensson wrote: I have tried compiling with all optimization flags turned on manually (list included below) and that compiles just fine. That leads me to think that what is causing the bug is some undocumented optimization, triggered only if optimize > 0. There is no optimization at all w

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Rask Ingemann Lambertsen
On Tue, Sep 18, 2007 at 06:09:18PM +0200, Rask Ingemann Lambertsen wrote: > On Tue, Sep 18, 2007 at 10:19:37PM +0800, Jie Zhang wrote: > > Rask Ingemann Lambertsen wrote: > > >The file bf532.ld is nowhere to be found in gcc or newlib/libgloss. > > > > > I have not pushed out our recent newlib/libgl

Re: bootstrap failure on ppc64-linux: ICE in set_variable_part

2007-09-18 Thread Richard Sandiford
Kenneth Zadeck <[EMAIL PROTECTED]> writes: > Richard Sandiford wrote: >> I think this is a latent bug in var-tracking.c. It's getting confused >> by the negative offsets in: >> >> (insn:HI 17 47 19 4 /tmp/foo.c:11 (set (reg:DI 26 26 [orig:124 tmp+-7 ] >> [124]) >> (lshiftrt:DI (reg:DI 31

MIPS atomic memory operations (A.K.A PR 33479).

2007-09-18 Thread David Daney
Richard, There seems to be a small problem with the MIPS atomic memory operations patch I recently committed (http://gcc.gnu.org/ml/gcc-patches/2007-08/msg01290.html), in that on a dual CPU machine it does not quite work. You can look at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33479#c3 f

Re: MIPS atomic memory operations (A.K.A PR 33479).

2007-09-18 Thread Daniel Jacobowitz
On Tue, Sep 18, 2007 at 05:12:48PM -0700, David Daney wrote: > I guess my basic question is: Should MIPS_COMPARE_AND_SWAP have a 'sync' > after > the 'sc'? I would have thought that 'sc' made the write visible to all CPUs, > but on the SB1 it appears not to be the case. Yes, a barrier of some

Re: Link tests after GCC_NO_EXECUTABLES

2007-09-18 Thread Jie Zhang
Rask Ingemann Lambertsen wrote: /home/rask/build/gcc-bfin-unknown-elf/gcc/../ld/ld-new: crt532.o: No such file: No such file or directory I sorted that out by using your config/bfin/elf.h, but there's something weird. The first time configure runs, it will complain about GCC_NO_EXECUTABLES b

RE: Two quick C++ performace inquiries

2007-09-18 Thread Ioannis Gyftos
Apologies for using the wrong mailing list. Thanks for your time! Ioannis