Nonzero result when left-shift greater than width of unsigned type

2007-04-13 Thread Ken Takusagawa
What's going on here? I'm expecting the answer 0, but get 2. #include int main(){ unsigned x=1; printf("%u\n",(x<<33)); /* outputs "2" on gcc 4.1.2 on x86_32 */ /* [#4] The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits are filled with zeros. If E1 has a

Re: Nonzero result when left-shift greater than width of unsigned type

2007-04-13 Thread Marcus Meissner
On Fri, Apr 13, 2007 at 05:38:03AM -0400, Ken Takusagawa wrote: > What's going on here? I'm expecting the answer 0, but get 2. > > #include > int main(){ > unsigned x=1; > printf("%u\n",(x<<33)); > /* outputs "2" on gcc 4.1.2 on x86_32 */ > > /* >[#4] The result of E1 << E2 is E1 l

Re: Nonzero result when left-shift greater than width of unsigned type

2007-04-13 Thread Ken Takusagawa
On 4/13/07, Marcus Meissner <[EMAIL PROTECTED]> wrote: On Fri, Apr 13, 2007 at 05:38:03AM -0400, Ken Takusagawa wrote: > What's going on here? I'm expecting the answer 0, but get 2. > > #include > int main(){ > unsigned x=1; > printf("%u\n",(x<<33)); > /* outputs "2" on gcc 4.1.2 on x86_32 *

RE: Call to arms: testsuite failures on various targets

2007-04-13 Thread Dave Korn
On 12 April 2007 22:22, FX Coudert wrote: > Hi all, > Note2: I also omitted a couple of gfortran.dg/secnds.f failures; this > testcase should be reworked I was about to report that myself! Both secnds.f /and/ secnds-1.f have some kind of race condition or indeterminacy. cheers, Da

Re: [MIPS] MADD issue

2007-04-13 Thread Paolo Bonzini
(define_insn "adddi3_internal_1" [(set (match_operand:DI 0 "register_operand" "=d,&d") (plus:DI (match_operand:DI 1 "register_operand" "0,d") (match_operand:DI 2 "register_operand" "d,d"))) (clobber (match_operand:SI 3 "register_operand" "=d,d"))] "!TARGET_64BIT &

Re: Call to arms: testsuite failures on various targets

2007-04-13 Thread Dominique Dhumieres
> * powerpc-apple-darwin8.5.0: gfortran.dg/edit_real_1.f90 I don't see these failures on my weekly snapshot build on OSX 10.3.9 (nor in a month old build on OSX 10.4.8 or 9, cannot remember). Could it be related to 10.4.5 gcc failures gcc.dg/torture/builtin-pow-mpfr-1.c and gcc.dg/torture/builtin-

Re: [MIPS] MADD issue

2007-04-13 Thread Richard Sandiford
"Fu, Chao-Ying" <[EMAIL PROTECTED]> writes: > After tracing GCC 4.x to see why MADD is not generated for MIPS32, > I found out the main issue is that the pattern "adddi3" > is not available for MIPS32. Because the missing > of adddi3, GCC 4.x needs to split 64-bit addition to 4 separate > RTL in

Re: Recent dataflow branch SPEC2000 benchmarking

2007-04-13 Thread Vladimir N. Makarov
Steven Bosscher wrote: On 4/12/07, Steven Bosscher <[EMAIL PROTECTED]> wrote: On 4/12/07, Vladimir Makarov <[EMAIL PROTECTED]> wrote: > An interesting observation is that the more hard registers the processor > has, the bigger slowdown is. Although it might be a coincidence. Yes, I noticed

Re: [MIPS] MADD issue

2007-04-13 Thread Nigel Stephens
Richard Sandiford wrote: As far as madd goes, I think it would be better to either (a) get combine to handle this situation or (b) get expand to generate a fused multiply-add from the outset. (b) sounds like it might be useful in its own right. At the moment we treat the generation of floati

Re: [MIPS] MADD issue

2007-04-13 Thread Richard Sandiford
Nigel Stephens <[EMAIL PROTECTED]> writes: > While I agree with you philosophically, it feels like (b) might be quite > a major task. A number of optimisation passes which currently recognise > and MUL and PLUS separately (e.g. loop strength reduction) would now > need to be extended to handle t

Re: [MIPS] MADD issue

2007-04-13 Thread Nigel Stephens
Richard Sandiford wrote: Nigel Stephens <[EMAIL PROTECTED]> writes: While I agree with you philosophically, it feels like (b) might be quite a major task. A number of optimisation passes which currently recognise and MUL and PLUS separately (e.g. loop strength reduction) would now need to

Re: RFA: i386 is running out target mask bits

2007-04-13 Thread Richard Henderson
On Thu, Apr 12, 2007 at 05:31:36PM -0700, H. J. Lu wrote: > http://gcc.gnu.org/ml/gcc-patches/2007-04/msg00738.html Ok. r~

tree_code and type safety

2007-04-13 Thread Thomas Neumann
Hi, while waiting for my copyright assignment, I continued compiling gcc with a C++ compiler. Most problems are minor, but now I encountered one where I am unsure what to do: The basic tree codes are defined by the enum tree_code, that basically looks like this: enum tree_code { LAST_AND_

Re: [MIPS] MADD issue

2007-04-13 Thread Ian Lance Taylor
Paolo Bonzini <[EMAIL PROTECTED]> writes: > > (define_insn "adddi3_internal_1" > > [(set (match_operand:DI 0 "register_operand" "=d,&d") > > (plus:DI (match_operand:DI 1 "register_operand" "0,d") > > (match_operand:DI 2 "register_operand" "d,d"))) > >(clobber (match_

Re: [MIPS] MADD issue

2007-04-13 Thread Paolo Bonzini
This should be a post-reload (i.e. predicated on reload_completed) split, I think. Actually, with the relatively recent lower-subreg work, it is desirable to split this sort of instruction before reload. That is, do an unconditional split. Right. Combine cannot cope with the resulting 4-in

Re: [MIPS] MADD issue

2007-04-13 Thread Richard Sandiford
Paolo Bonzini <[EMAIL PROTECTED]> writes: >>> This should be a post-reload (i.e. predicated on reload_completed) >>> split, I think. >> >> Actually, with the relatively recent lower-subreg work, it is >> desirable to split this sort of instruction before reload. That is, >> do an unconditional sp

Re: Call to arms: testsuite failures on various targets

2007-04-13 Thread Brooks Moses
Dave Korn wrote: On 12 April 2007 22:22, FX Coudert wrote: Note2: I also omitted a couple of gfortran.dg/secnds.f failures; this testcase should be reworked I was about to report that myself! Both secnds.f /and/ secnds-1.f have some kind of race condition or indeterminacy. It's an indeter

Re: RFC: Add target_isa_flags

2007-04-13 Thread Andrew Pinski
On 4/13/07, H. J. Lu <[EMAIL PROTECTED]> wrote: You don't need to do all this, You can just use variable with MASK which was added by JSM when PPC64-linux-gnu's target bits overflowed. -- Pinski

Re: RFC: Add target_isa_flags

2007-04-13 Thread H. J. Lu
On Fri, Apr 13, 2007 at 12:04:04PM -0700, Andrew Pinski wrote: > On 4/13/07, H. J. Lu <[EMAIL PROTECTED]> wrote: > > You don't need to do all this, You can just use variable with MASK > which was added by JSM when PPC64-linux-gnu's target bits overflowed. For i386, we are adding new target mask b

GIMPLE tuples document uploaded to wiki

2007-04-13 Thread Diego Novillo
I have added the design document and links to most of the discussions we've had so far. Aldy updated the document to reflect the latest thread. http://gcc.gnu.org/wiki/tuples

Re: RFC: Add target_isa_flags

2007-04-13 Thread Andrew Pinski
On 4/13/07, H. J. Lu <[EMAIL PROTECTED]> wrote: On Fri, Apr 13, 2007 at 12:04:04PM -0700, Andrew Pinski wrote: > On 4/13/07, H. J. Lu <[EMAIL PROTECTED]> wrote: > > You don't need to do all this, You can just use variable with MASK > which was added by JSM when PPC64-linux-gnu's target bits overf

Re: RFC: Add target_isa_flags

2007-04-13 Thread H. J. Lu
On Fri, Apr 13, 2007 at 02:13:34PM -0700, Andrew Pinski wrote: > On 4/13/07, H. J. Lu <[EMAIL PROTECTED]> wrote: > >On Fri, Apr 13, 2007 at 12:04:04PM -0700, Andrew Pinski wrote: > >> On 4/13/07, H. J. Lu <[EMAIL PROTECTED]> wrote: > >> > >> You don't need to do all this, You can just use variable

Re: RFC: Add target_isa_flags

2007-04-13 Thread Andrew Pinski
On 4/13/07, H. J. Lu <[EMAIL PROTECTED]> wrote: But this option isn't needed before. This option should have been there anyways, I don't understand why the option does not exist. -- Pinski

gcc-4.3-20070413 is now available

2007-04-13 Thread gccadmin
Snapshot gcc-4.3-20070413 is now available on ftp://gcc.gnu.org/pub/gcc/snapshots/4.3-20070413/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 4.3 SVN branch with the following options: svn://gcc.gnu.org/svn/gcc/trunk