[Bug tree-optimization/26069] [4.1/4.2/4.3 Regression] Runtime endian-ness check is no longer optimized out.

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #26 from pinskia at gcc dot gnu dot org  2008-04-30 04:13 
---
A simple fix for the patch is to add:
  && TREE_CODE (TREE_TYPE (TREE_OPERAND (def_rhs, 0))) != ARRAY_TYPE

But note, we still get worse code with the C front-end than with the C++
front-end but that is due to the C front producing &a instead of &a[0] .


-- 


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



[Bug tree-optimization/26069] [4.1/4.2/4.3 Regression] Runtime endian-ness check is no longer optimized out.

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #25 from pinskia at gcc dot gnu dot org  2008-04-30 04:04 
---
(In reply to comment #24)
> This is the patch which I am testing for the testcase in comment #11 as
> mentioned we don't use NOP_EXPR but instead VIEW_CONVERT_EXPR as
> VIEW_CONVERT_EXPR can work on non gimple registers.

This patch breaks when we have an array type ...


-- 


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



[Bug tree-optimization/26069] [4.1/4.2/4.3 Regression] Runtime endian-ness check is no longer optimized out.

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #24 from pinskia at gcc dot gnu dot org  2008-04-30 03:58 
---
Created an attachment (id=15551)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15551&action=view)
Patch for comment #11 on the tree level

This is the patch which I am testing for the testcase in comment #11 as
mentioned we don't use NOP_EXPR but instead VIEW_CONVERT_EXPR as
VIEW_CONVERT_EXPR can work on non gimple registers.


-- 


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



[Bug tree-optimization/26069] [4.1/4.2/4.3 Regression] Runtime endian-ness check is no longer optimized out.

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #23 from pinskia at gcc dot gnu dot org  2008-04-30 03:47 
---
(In reply to comment #21)
> (In reply to comment #20)
> 
> > Here are 2 alternatives I've been playing with:
> 
> Any news on this patch?

The second patch looks like what is was done on the RTL level with respect of
DSE.  I am testing a patch to tree-ssa-forwprop that adds folding where the
sizes of the types are the same to use VIEW_CONVERT_EXPR.  This will allow us
to do the correct thing on the tree level for comment #11. Note we don't
convert it to a NOP_EXPR yet because it creates invalid gimple.  It also allows
us to "fixup" aliasing issues where the types are the same size so we will get
less bug reports about those cases.


-- 


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



[Bug tree-optimization/36054] bad code generation with -ftree-vectorize

2008-04-29 Thread victork at gcc dot gnu dot org


--- Comment #2 from victork at gcc dot gnu dot org  2008-04-30 02:48 ---
Hello,

I've tried to complile the attached kernel_build.ii on my SUSE SLES 10 x86_64
machine, but got a bunch of compile errors like this:

In file included from /usr/lib/gcc/i486-linux-gnu/4.3.1/include/xmmintrin.h:40,
 from source/dsp/simd_sse.hpp:24,
 from source/dsp/arithmetic_wrapper.hpp:32,
 from source/kernel/audio_backend/audio_backend.hpp:35,
 from source/kernel/scheduler.hpp:33,
 from source/kernel/class_system/classloader.hpp:33,
 from source/kernel/class_system/class.hpp:33,
 from source/kernel/object_system/gobj.hpp:31,
 from source/nova_includes.hpp:31,
 from source/nova.hpp:30,
 from
/home/tim/workspace/nova/source/kernel/audio_backend/audio_backend.cpp:27,
 from
/home/tim/workspace/nova/release/kernel/audio_backend/build.cpp:2,
 from release/kernel/kernel_build.cpp:2:
/usr/lib/gcc/i486-linux-gnu/4.3.1/include/mmintrin.h: In function
вЂint __vector__ _mm_add_si64(int __vector__, int
__vector__)’:
/usr/lib/gcc/i486-linux-gnu/4.3.1/include/mmintrin.h:312: error: cannot convert
вЂlong long int’ to вЂlong long int
__vector__’ for argument вЂ1’ to
вЂlong long int __vector__ __builtin_ia32_paddq(long long int
__vector__, long long int __vector__)’


Anyway. I see that recently were fixed some problems related to stack alignment
like PR35496. Can you try to compile your example with latest gcc 4.4 compiler
from mainline?


-- 

victork at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||Joey dot ye at intel dot
   ||com, hjl dot tools at gmail
   ||dot com


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



[Bug fortran/35940] Array BACK ignored in INDEX intrinsic when other args scalar

2008-04-29 Thread bdavis at gcc dot gnu dot org


--- Comment #6 from bdavis at gcc dot gnu dot org  2008-04-30 00:55 ---
notice the 6 minutes between the above posts :)
jerry was correct, it needed a NULL check. 


-- 


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



[Bug fortran/35940] Array BACK ignored in INDEX intrinsic when other args scalar

2008-04-29 Thread bdavis at gcc dot gnu dot org


--- Comment #5 from bdavis at gcc dot gnu dot org  2008-04-30 00:54 ---
close.  here is a better patch.

http://gcc.gnu.org/ml/fortran/2008-04/msg00278.html


-- 


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



[Bug fortran/35940] Array BACK ignored in INDEX intrinsic when other args scalar

2008-04-29 Thread jvdelisle at gcc dot gnu dot org


--- Comment #4 from jvdelisle at gcc dot gnu dot org  2008-04-30 00:00 
---
Note the last line of patch is checking for b != NULL before using it. 
Probably want to do likewise for the added test condition above.


-- 


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



[Bug ada/35792] Illegal program not detected, RM 3.10.1(4/2)

2008-04-29 Thread sam at gcc dot gnu dot org


--- Comment #3 from sam at gcc dot gnu dot org  2008-04-29 21:46 ---
This bug is now fixed in GCC 4.4.0.


-- 

sam at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.4.0


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



[Bug ada/35792] Illegal program not detected, RM 3.10.1(4/2)

2008-04-29 Thread sam at gcc dot gnu dot org


--- Comment #2 from sam at gcc dot gnu dot org  2008-04-29 21:44 ---
Subject: Bug 35792

Author: sam
Date: Tue Apr 29 21:43:39 2008
New Revision: 134810

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134810
Log:
2008-04-29  Ed Schonberg  <[EMAIL PROTECTED]>

gcc/ada/
PR ada/35792
* sem_ch3.adb (Find_Type_Name): Refuse completion of an incomplete
tagged type by an untagged protected or task type.

2008-04-29  Samuel Tardieu  <[EMAIL PROTECTED]>

gcc/testsuite/
PR ada/35792
* gnat.dg/specs/tag2.ads: New.

Added:
trunk/gcc/testsuite/gnat.dg/specs/tag2.ads
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/sem_ch3.adb
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug regression/36082] -finline-functions miscompiles tail recursion

2008-04-29 Thread kas at fi dot muni dot cz


--- Comment #2 from kas at fi dot muni dot cz  2008-04-29 21:39 ---
Interesting. When rewritten to use union, it works even with -O3. Thanks!


-- 


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



[Bug libstdc++/35922] std::unordered_map missing in debug mode

2008-04-29 Thread bkoz at gcc dot gnu dot org


--- Comment #8 from bkoz at gcc dot gnu dot org  2008-04-29 21:37 ---

Fixed on trunk and gcc-4_3-branch


-- 

bkoz at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.3.1


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



[Bug c/21920] aliasing violations

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #127 from pinskia at gcc dot gnu dot org  2008-04-29 21:24 
---
*** Bug 36082 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||kas at fi dot muni dot cz


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



[Bug regression/36082] -finline-functions miscompiles tail recursion

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-04-29 21:24 ---
It is more than unportable, it contains undefined code as you violate C/C++
aliasing rules:

d = *(unsigned long *)e1;
*(unsigned long *)e1 = *(unsigned long *)e2;
*(unsigned long *)e2 = d;

You are accessing a bucket_entry_t as unsigned long.

*** This bug has been marked as a duplicate of 21920 ***


-- 

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=36082



[Bug regression/36082] New: -finline-functions miscompiles tail recursion

2008-04-29 Thread kas at fi dot muni dot cz
In my program I use recursive quick-sort, which is apparently miscompiled by my
gcc (Fedora 8, x86_64), when I use -O3 or -O2 -finline-functions. With these
options, the data get out of the qsort routine only partially sorted. With -O2
it is OK, and when I add a debugging printf() at the end of the qsort routine
(thus disabling the tail-call recursion), it also works (even with -O3 or -O2
-finline-functions).

The test program is at http://www.fi.muni.cz/~kas/data/sorttest.c - try to
compile it and run on 64-bit x86_64 system (it is non-portable, but it is a
design decision) with -O2 and with -O3. Then uncomment the debugging code
near the end of the file, and try it again.


-- 
   Summary: -finline-functions miscompiles tail recursion
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: regression
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kas at fi dot muni dot cz
 GCC build triplet: x86_64-redhat-linux
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


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



[Bug debug/35925] -g1 causes "Error: file number 1 already allocated"

2008-04-29 Thread mrs at mythic-beasts dot com


--- Comment #2 from mrs at mythic-beasts dot com  2008-04-29 21:02 ---
Thanks for the explanation.  I have filed a bug on glibc with a simple
workaround (http://sources.redhat.com/bugzilla/show_bug.cgi?id=6428).  Changing
binutils is not necessary to fix glibc's configure check.


-- 

mrs at mythic-beasts dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug libstdc++/35922] std::unordered_map missing in debug mode

2008-04-29 Thread bkoz at gcc dot gnu dot org


--- Comment #7 from bkoz at gcc dot gnu dot org  2008-04-29 19:45 ---
Subject: Bug 35922

Author: bkoz
Date: Tue Apr 29 19:44:18 2008
New Revision: 134806

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134806
Log:
2008-04-29  Benjamin Kosnik  <[EMAIL PROTECTED]>

PR libstdc++/35922
* include/std/unordered_map: Include debug/unordered_map if
_GLIBCXX_DEBUG.
* testsuite/23_containers/unordered_map/requirements/debug.cc: Move...
* testsuite/23_containers/unordered_map/requirements/
debug_container.cc: ...here.
* testsuite/23_containers/unordered_map/requirements/debug_mode.cc:
New.
* testsuite/23_containers/unordered_set/requirements/debug.cc: Move...
* testsuite/23_containers/unordered_set/requirements/
debug_container.cc: ...here.
* testsuite/23_containers/unordered_set/requirements/debug_mode.cc:
New.



Added:
   
branches/gcc-4_3-branch/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug_container.cc
  - copied unchanged from r134802,
branches/gcc-4_3-branch/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc
   
branches/gcc-4_3-branch/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug_mode.cc
   
branches/gcc-4_3-branch/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug_container.cc
  - copied unchanged from r134802,
branches/gcc-4_3-branch/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc
   
branches/gcc-4_3-branch/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug_mode.cc
Removed:
   
branches/gcc-4_3-branch/libstdc++-v3/testsuite/23_containers/unordered_map/requirements/debug.cc
   
branches/gcc-4_3-branch/libstdc++-v3/testsuite/23_containers/unordered_set/requirements/debug.cc
Modified:
branches/gcc-4_3-branch/libstdc++-v3/ChangeLog
branches/gcc-4_3-branch/libstdc++-v3/include/std/unordered_map


-- 


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



[Bug fortran/35940] Array BACK ignored in INDEX intrinsic when other args scalar

2008-04-29 Thread bdavis at gcc dot gnu dot org


--- Comment #3 from bdavis at gcc dot gnu dot org  2008-04-29 19:23 ---
this looks promising:

Index: gcc/gcc/fortran/simplify.c
===
--- gcc/gcc/fortran/simplify.c  (revision 134801)
+++ gcc/gcc/fortran/simplify.c  (working copy)
@@ -1570,7 +1570,8 @@
   int back, len, lensub;
   int i, j, k, count, index = 0, start;

-  if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT)
+  if (x->expr_type != EXPR_CONSTANT || y->expr_type != EXPR_CONSTANT 
+  || b->expr_type !=  EXPR_CONSTANT)
 return NULL;

   if (b != NULL && b->value.logical != 0)


-- 


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



[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #8 from pinskia at gcc dot gnu dot org  2008-04-29 19:11 ---
>And for syncing the threads, that's the easiest way.

Use mutexes then, they are designed exactly for this.

>I don't want so serialize the threads, I want to use all 2 processors of my
dual-core.

You are serializing them by doing a busy loop.  In fact using a busy loop will
just make the CPUs spin without doing anything except for checking a condition.
 Using a mutex allows for other stuff to happen while that thread is waiting
for more work to do.

I guess you need to read up on threading programming more because right now you
are causing extra work to happen on thread for no reason.

-- Pinski


-- 


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



[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de


--- Comment #7 from snes2002 at freenet dot de  2008-04-29 19:06 ---
Subject: Re:  gcc optimizations and threads (pthread)

thanks for the quick reply.

But this code works without opimizations. Even with complex constructs.
For the solution of my problem i can't use lock's.
I don't want so serialize the threads, I want to use all 2 processors of my
dual-core.
And for syncing the threads, that's the easiest way.

Works fine whithout optimizations and also works with borland c++-compiler with
all optimizations.


- original Nachricht 

Betreff: [Bug driver/36081] gcc optimizations and threads (pthread)
Gesendet: Di 29 Apr 2008 20:55:20 CEST
Von: "pinskia at gcc dot gnu dot org"<[EMAIL PROTECTED]>

> 
> 
> --- Comment #2 from pinskia at gcc dot gnu dot org  2008-04-29 18:54
> ---
> This is correct behavior, you need either use volatile or use locks.
> 
> 
> -- 
> 
> pinskia at gcc dot gnu dot org changed:
> 
>What|Removed |Added
> 
> 
>  Status|UNCONFIRMED |RESOLVED
>  Resolution||INVALID
> 
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36081
> 
> --- You are receiving this mail because: ---
> You reported the bug, or are watching the reporter.
> 

--- original Nachricht Ende 


-- 


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



[Bug middle-end/36074] [4.4 Regression]: 447.dealII in SPEC CPU 2006 failed to compile

2008-04-29 Thread hjl dot tools at gmail dot com


--- Comment #6 from hjl dot tools at gmail dot com  2008-04-29 19:03 ---
Revision 134799 works.

*** This bug has been marked as a duplicate of 36078 ***


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||DUPLICATE


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



[Bug tree-optimization/36078] [4.4 Regression] gfortran fails to build cpu2006/465.tonto

2008-04-29 Thread hjl dot tools at gmail dot com


--- Comment #5 from hjl dot tools at gmail dot com  2008-04-29 19:03 ---
*** Bug 36074 has been marked as a duplicate of this bug. ***


-- 


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



[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de


--- Comment #6 from snes2002 at freenet dot de  2008-04-29 18:59 ---
This c-code works with optimizations turned off.
With borland compiler it also works with optimizations turned on.


-- 


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



[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de


--- Comment #5 from snes2002 at freenet dot de  2008-04-29 18:57 ---
Created an attachment (id=15550)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15550&action=view)
assembler listing


-- 


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



[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de


--- Comment #4 from snes2002 at freenet dot de  2008-04-29 18:56 ---
Created an attachment (id=15549)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15549&action=view)
preprocessed file


-- 


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



[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de


--- Comment #3 from snes2002 at freenet dot de  2008-04-29 18:55 ---
Created an attachment (id=15548)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15548&action=view)
c source


-- 


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



[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2008-04-29 18:54 ---
This is correct behavior, you need either use volatile or use locks.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug driver/36081] gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de


--- Comment #1 from snes2002 at freenet dot de  2008-04-29 18:54 ---
Created an attachment (id=15547)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15547&action=view)
gcc output


-- 


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



[Bug driver/36081] New: gcc optimizations and threads (pthread)

2008-04-29 Thread snes2002 at freenet dot de
gcc version 4.2.1 (Debian 4.2.1-3)
System: debian-installation from knoppix 5.1.1

When optimizations are turned on (-O, -O1, -O2, -O3),
two or more threads don't recognize when the value of a global variable
changes.
It doesn't matter if it's a global variable or a pointer to a local variable.
The change of its value by thread no 1 will not be recognized by thread no 2.


-- 
   Summary: gcc optimizations and threads (pthread)
   Product: gcc
   Version: 4.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: snes2002 at freenet dot de


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



[Bug target/35657] [4.3] Alignments of DFP types aren't consistent

2008-04-29 Thread hjl dot tools at gmail dot com


--- Comment #8 from hjl dot tools at gmail dot com  2008-04-29 18:44 ---
On IA32, all 8 byte types should be aligned at 4 byte and 16byte types
should be aligned at 16 byte. The only discrepancy is alignment of
8byte DFP type, _Decimal64. Gcc aligns it at 8 byte. But we should
treat its alignment like double.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

Summary|[4.3] TDmode isn't aligned  |[4.3] Alignments of DFP
   |at 128bit when passing to a |types aren't consistent
   |function|


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



[Bug target/35657] [4.3] TDmode isn't aligned at 128bit when passing to a function

2008-04-29 Thread ubizjak at gmail dot com


-- 

ubizjak at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-04-29 18:06:55
   date||
   Target Milestone|--- |4.3.1


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



[Bug target/35657] [4.3] TDmode isn't aligned at 128bit when passing to a function

2008-04-29 Thread ubizjak at gmail dot com


--- Comment #7 from ubizjak at gmail dot com  2008-04-29 18:06 ---
The alignment of TDmode is not yet decided, see
http://groups.google.com/group/ia32-abi/browse_thread/thread/fc6db344b62dea76

Reopened as P1 bug, blocking 4.3.1 release, as per suggestion in
http://gcc.gnu.org/ml/gcc-patches/2008-04/msg02135.html


-- 

ubizjak at gmail dot com changed:

   What|Removed |Added

   Severity|normal  |blocker
 Status|RESOLVED|UNCONFIRMED
   Keywords||ABI
   Priority|P3  |P1
 Resolution|FIXED   |
Summary|TDmode isn't aligned at |[4.3] TDmode isn't aligned
   |128bit when passing to a|at 128bit when passing to a
   |function|function


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



[Bug c++/33661] template methods forget explicit local reg vars

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #5 from pinskia at gcc dot gnu dot org  2008-04-29 17:09 ---
*** Bug 36080 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||adam at os dot inf dot tu-
   ||dresden dot de


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



[Bug c++/36080] Register specification ignored in template function.

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-04-29 17:09 ---


*** This bug has been marked as a duplicate of 33661 ***


-- 

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=36080



[Bug c++/36080] New: Register specification ignored in template function.

2008-04-29 Thread adam at os dot inf dot tu-dresden dot de
Hi,

when doing 'register int val asm("rx")' in a template function the explicit
register allocation is ignored and val is given an arbitrary register without
any notice. The following test shows that the asm-statement is ignored.

class X {
public:
  template  int func_template(int *x);
  int no_template(int *x);
};

template 
int X::func_template(int *x)
{
  register int val asm("doesn't matter what's in here");
  asm volatile("mov %0, %0"   : "=r" (val) : "0" (x));
  return val;
}

int X::no_template(int *x)
{
  register int val asm("edx");
  asm volatile("mov %0, %0"   : "=r" (val) : "0" (x));
  return int(val);
}

#include 
int main(void)
{
  X x; int y;
  printf("%d %d\n", x.no_template(&y), x.func_template(&y));
  return 0;
}

A normal function works as expected. We initially found this on a ARM target
but it's the same on x86. I get the same results with various versions of
native and cross compilers of 3.4, 4.1, 4.2, 4.3 and trunk.


-- 
   Summary: Register specification ignored in template function.
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: adam at os dot inf dot tu-dresden dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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



[Bug tree-optimization/35518] [4.4 Regression] FAIL: gcc.c-torture/execute/20040709-1.c execution at -O2 and above

2008-04-29 Thread dave at hiauly1 dot hia dot nrc dot ca


--- Comment #6 from dave at hiauly1 dot hia dot nrc dot ca  2008-04-29 
16:08 ---
Subject: Re:  [4.4 Regression] FAIL: gcc.c-torture/execute/20040709-1.c
execution at -O2 and above

> I first saw this in 133010.

It was introduced in 132969.

Dave


-- 


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



[Bug debug/35896] [4.4 Regression] gfortran TLS symbols broken with debug info

2008-04-29 Thread jakub at gcc dot gnu dot org


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2008-
   ||04/msg02114.html
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-04-29 16:07:37
   date||


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



[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #10 from rguenth at gcc dot gnu dot org  2008-04-29 16:03 
---
The fold missed optimizations are fixed.


-- 


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



[Bug tree-optimization/36078] [4.4 Regression] gfortran fails to build cpu2006/465.tonto

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2008-04-29 16:02 ---
Subject: Bug 36078

Author: rguenth
Date: Tue Apr 29 16:01:36 2008
New Revision: 134799

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134799
Log:
2008-04-29  Richard Guenther  <[EMAIL PROTECTED]>

PR tree-optimization/36078
* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely):
Update virtual SSA form after cleaning up the CFG.

* gfortran.fortran-torture/compile/pr36078.f90: New testcase.

Added:
trunk/gcc/testsuite/gfortran.fortran-torture/compile/pr36078.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-loop-ivcanon.c


-- 


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



[Bug tree-optimization/36078] [4.4 Regression] gfortran fails to build cpu2006/465.tonto

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2008-04-29 16:02 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #9 from rguenth at gcc dot gnu dot org  2008-04-29 16:00 ---
Subject: Bug 15255

Author: rguenth
Date: Tue Apr 29 15:59:43 2008
New Revision: 134798

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134798
Log:
2008-04-29  Richard Guenther  <[EMAIL PROTECTED]>

PR middle-end/15255
* fold-const.c (fold_binary): Fold (A + A) * C to A * 2*C.

* gcc.dg/fold-plusmult.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/fold-plusmult.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug target/27234] no way to stop gcc from mucking with the incoming argument stack on ia32

2008-04-29 Thread hubicka at gcc dot gnu dot org


--- Comment #20 from hubicka at gcc dot gnu dot org  2008-04-29 15:40 
---
Created an attachment (id=15546)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15546&action=view)
New patch

Hi,
this patch implements idea of having temporary read-only register with
REG_EQUIV note that will get propagated to place of the read-write parameter
register.
However I am still midly confused, when reload is actually using the operand
slot in read-write way?  I don't seem to be able to construct a testcase.
If reload is not doing that, perhaps just dropping the function.c part of patch
is easiest way around.

Honza


-- 


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



[Bug middle-end/36077] [4.1/4.2 Regression] Expressions result is wrong

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2008-04-29 15:13 ---
Also fixed on the 4.3 branch.  Unassigning.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|rguenth at gcc dot gnu dot  |unassigned at gcc dot gnu
   |org |dot org
 Status|ASSIGNED|NEW
  Known to fail|3.3.3 4.3.0 |3.3.3 4.1.2 4.2.3 4.3.0
  Known to work|2.95.3 4.4.0|2.95.3 4.3.1 4.4.0
Summary|Expressions result is wrong |[4.1/4.2 Regression]
   ||Expressions result is wrong
   Target Milestone|--- |4.2.4


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



[Bug middle-end/36077] Expressions result is wrong

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #7 from rguenth at gcc dot gnu dot org  2008-04-29 15:13 ---
Subject: Bug 36077

Author: rguenth
Date: Tue Apr 29 15:12:21 2008
New Revision: 134794

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134794
Log:
2008-04-29  Richard Guenther  <[EMAIL PROTECTED]>

PR middle-end/36077
* fold-const.c (extract_muldiv_1): In combining division constants
make sure to never overflow.

* gcc.c-torture/execute/pr36077.c: New testcase.

Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.c-torture/execute/pr36077.c
  - copied unchanged from r134792,
trunk/gcc/testsuite/gcc.c-torture/execute/pr36077.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/fold-const.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug target/36079] [4.3/4.4 Regression] cld instruction is not emitted anymore.

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2008-04-29 14:46 ---
ISVs usually build with compilers from the stone-age to be able to run their
applications on all still supported OS versions.  So it is very unlikely that
they will hit this problem.  In fact if we enable this workaround in 4.3 we
give them a false sense of security that this "feature" is maintained.  It also
gives them a false sense of the severity of this problem which is very low,
very much lower than any other random wrong-code bug we discover.

Marking as ABI issue, but not wrong-code (it is not).  Marking as regression.

I vote for "RESOVED INVALID".


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||ABI
   Last reconfirmed|-00-00 00:00:00 |2008-04-29 14:46:20
   date||
Summary|cld instruction is not  |[4.3/4.4 Regression] cld
   |emitted anymore.|instruction is not emitted
   ||anymore.
   Target Milestone|--- |4.3.1


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



[Bug tree-optimization/36078] [4.4 Regression] gfortran fails to build cpu2006/465.tonto

2008-04-29 Thread dominiq at lps dot ens dot fr


--- Comment #2 from dominiq at lps dot ens dot fr  2008-04-29 14:44 ---
If this may help, the test case compiles on powerpc-apple-darwin9, revision
134791+patches, but fails on i686-apple-darwin9 revision 134751+patches.


-- 


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



[Bug tree-optimization/15255] [tree-ssa] a * 2 + a * 2 is not converted to a * 4

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2008-04-29 14:17 ---
We already handle most of the foldings in fold_plusminus_mult_expr, just the
A + A -> 2 * A folding is not done (for a reason).

We also miss (A + A) * Cst -> A * 2 * Cst, which is what I am going to
implement
in addition to extending the tree re-association pass. 


-- 


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



[Bug middle-end/36077] Expressions result is wrong

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2008-04-29 13:53 ---
Subject: Bug 36077

Author: rguenth
Date: Tue Apr 29 13:52:53 2008
New Revision: 134792

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134792
Log:
2008-04-29  Richard Guenther  <[EMAIL PROTECTED]>

PR middle-end/36077
* fold-const.c (extract_muldiv_1): In combining division constants
make sure to never overflow.

* gcc.c-torture/execute/pr36077.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr36077.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/fold-const.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug middle-end/36077] Expressions result is wrong

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2008-04-29 13:53 ---
Fixed on the trunk.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  Known to work|2.95.3  |2.95.3 4.4.0


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



[Bug target/36079] cld instruction is not emitted anymore.

2008-04-29 Thread cnstar9988 at gmail dot com


--- Comment #2 from cnstar9988 at gmail dot com  2008-04-29 13:36 ---
This PR 36079 can't appear on buglist.

target_milestone=4.3.1
short_desc=4.3

?


-- 


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



[Bug libgomp/28482] Cannot use libgomp in shared library

2008-04-29 Thread ilmarw at simula dot no


--- Comment #11 from ilmarw at simula dot no  2008-04-29 13:36 ---
Fixed in version 4.3.0.


-- 


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



[Bug target/36079] cld instruction is not emitted anymore.

2008-04-29 Thread ubizjak at gmail dot com


--- Comment #1 from ubizjak at gmail dot com  2008-04-29 13:15 ---
Since there are many workarounds for this problem I think that this problem
should be fixed elsewhere by either (a) fixing the kernel or (b) fixing the
application that is affected by the problem

a) A two-liner patch to the kernel. This is the approach that major
distribution have taken.

b) The fix is to add explicit cld at the beginning of the function that can be
called from exception handler and uses string operations.

Due to the nature of the problem, it is very unlikely that this problem will
hit real word applications. OTOH, cld instruction has non-negligible
performance impact. Adding -mcld to compile flags in order to emit cld at the
beginning of every function that uses stringops will introduce certain
performance hit. 


-- 


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



[Bug target/36079] New: cld instruction is not emitted anymore.

2008-04-29 Thread ubizjak at gmail dot com
This bug is opened to track the issue with cld insn.

gcc-4.3.0 does not emit cld instruction anymore in front of string instruction.
Due to this, OSes that does not clear direction flag in task switch can enter
exception handler with D flag set. This is ABI violation since ABI requires D
flag to be cleared on function entry.

Proposed patch (with a lot of follow-up discussion) is here:

http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00417.html

and further discussion here:

http://gcc.gnu.org/ml/gcc-patches/2008-04/msg02026.html


-- 
   Summary: cld instruction is not emitted anymore.
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ubizjak at gmail dot com
GCC target triplet: i686-pc-linux-gnu


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



[Bug fortran/36076] Pointer intent(IN): Mark as const pointer

2008-04-29 Thread burnus at gcc dot gnu dot org


--- Comment #3 from burnus at gcc dot gnu dot org  2008-04-29 12:03 ---
> const for non function decls, mean nothing to the middle-end.
> I mean on local variables, const mean nothing.

Good to know. Then every (non-VALUE) dummy argument except POINTERs and
ALLOCATABLEs can be marked as "const" -- and POINTERS and ALLOCATABLE if they
are INTENT(IN).


-- 


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



[Bug middle-end/36077] Expressions result is wrong

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2008-04-29 11:41 ---
Mine.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
  Known to fail||3.3.3 4.3.0
  Known to work||2.95.3
   Last reconfirmed|2008-04-29 11:40:23 |2008-04-29 11:41:15
   date||


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



[Bug middle-end/36077] Expressions result is wrong

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2008-04-29 11:40 ---
Confirmed.  Testcase:

extern void abort (void);

unsigned test (unsigned x)
{
  return x / 0x8001U / 0x0002U;
}

int main()
{
  if (test(2) != 0)
abort ();
  return 0;
}


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Component|c   |middle-end
 Ever Confirmed|0   |1
  GCC build triplet|gcc version 4.1.2 20070626  |
   |(Red Hat 4.1.2-14)  |
   GCC host triplet|Linux 2.6.9-67.ELsmp #1 SMP |
   |Wed Nov 7 13:56:44 EST 2007 |
   |x86_64 x|
 GCC target triplet|Target: x86_64-redhat-linux |
   Keywords||wrong-code
   Last reconfirmed|-00-00 00:00:00 |2008-04-29 11:40:23
   date||


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



[Bug fortran/36076] Pointer intent(IN): Mark as const pointer

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2008-04-29 11:35 ---
I mean on local variables, const mean nothing.


-- 


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



[Bug fortran/36076] Pointer intent(IN): Mark as const pointer

2008-04-29 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-04-29 11:35 ---
const for non function decls, mean nothing to the middle-end.


-- 


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



[Bug middle-end/36075] [4.3.1 Regression] FAIL: gcc.c-torture/execute/20021119-1.c execution, -O2

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2008-04-29 11:30 ---
Please reduce this to a specific revision.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||wrong-code
  Known to work||4.3.0
   Target Milestone|--- |4.3.1


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



[Bug middle-end/36074] [4.4 Regression]: 447.dealII in SPEC CPU 2006 failed to compile

2008-04-29 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Keywords||ice-on-valid-code
   Last reconfirmed|-00-00 00:00:00 |2008-04-29 11:14:13
   date||


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



[Bug tree-optimization/36078] [4.4 Regression] gfortran fails to build cpu2006/465.tonto

2008-04-29 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  Component|middle-end  |tree-optimization
   Keywords||ice-on-valid-code
Summary|gfortran fails to build |[4.4 Regression] gfortran
   |cpu2006/465.tonto   |fails to build
   ||cpu2006/465.tonto
   Target Milestone|--- |4.4.0


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



[Bug middle-end/36078] gfortran fails to build cpu2006/465.tonto

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #1 from rguenth at gcc dot gnu dot org  2008-04-29 11:13 ---
Created an attachment (id=15545)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15545&action=view)
proposed patch

Can you try this patch with dealII?


-- 


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



[Bug middle-end/36078] gfortran fails to build cpu2006/465.tonto

2008-04-29 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-04-29 11:12:37
   date||


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



[Bug middle-end/36074] [4.4 Regression]: 447.dealII in SPEC CPU 2006 failed to compile

2008-04-29 Thread Joey dot ye at intel dot com


--- Comment #5 from Joey dot ye at intel dot com  2008-04-29 10:41 ---
Can be related to http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36078, where I do
have a small case.


-- 


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



[Bug middle-end/36078] New: gfortran fails to build cpu2006/465.tonto

2008-04-29 Thread Joey dot ye at intel dot com
Start from trunk 134730, still fail by 134775:

$ cat f2.f90
   subroutine foo(func,p,eval)
  real(kind=kind(1.0d0)), dimension(3,0:4,0:4,0:4) :: p
  logical(kind=kind(.true.)), dimension(5,5,5) :: eval
  interface
 subroutine func(values,pt)
real(kind=kind(1.0d0)), dimension(:), intent(out) :: values
real(kind=kind(1.0d0)), dimension(:,:), intent(in) :: pt
 end subroutine
  end interface
  real(kind=kind(1.0d0)), dimension(125,3) :: pt
  integer(kind=kind(1)) :: n_pt

  n_pt = 1
  pt(1:n_pt,:) = &
 reshape( &
pack( &
   transpose(reshape(p,(/3,125/))), &
   spread(reshape(eval,(/125/)),dim=2,ncopies=3)), &
(/n_pt,3/))

   end subroutine
   end 

$ gfortran -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ../src/configure --disable-bootstrap
--enable-languages=c,fortran
Thread model: posix
gcc version 4.4.0 20080427 (experimental) [trunk revision 134730] (GCC) 

$ gfortran -c -O2 f2.f90
f2.f90: In function 'foo':
f2.f90:1: internal compiler error: in execute_todo, at passes.c:991
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


-- 
   Summary: gfortran fails to build cpu2006/465.tonto
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Joey dot ye at intel dot com


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



[Bug c/36077] Expressions result is wrong

2008-04-29 Thread peter at xmos dot com


--- Comment #2 from peter at xmos dot com  2008-04-29 10:23 ---
Created an attachment (id=15544)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15544&action=view)
test.i


-- 


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



[Bug c/36077] Expressions result is wrong

2008-04-29 Thread peter at xmos dot com


--- Comment #1 from peter at xmos dot com  2008-04-29 10:23 ---
Created an attachment (id=15543)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15543&action=view)
test.c


-- 


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



[Bug c/36077] New: Expressions result is wrong

2008-04-29 Thread peter at xmos dot com
I am developing a test generator for in house compilers and have come across a
difference where gcc does not agree with our compilers or the Microsoft
compiler.

The result t1_2a of the expression is what differs between gcc and other
compilers.

This is on gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9), and does not matter what
the platform is.

Compiled with:

$ gcc4 test.c -o test.exe
$ ./test.exe
Error:
t1_2a 
t1_2b 22a8b02e
t1_2c 0

Working:
t2_2a 0
t2_2b 0

When compared to running on Visual Studio:

$ cl test.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.762 for
80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

test.c
Microsoft (R) Incremental Linker Version 8.00.50727.762
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:test.exe
test.obj

$ ./test.exe
Error:
t1_2a 0
t1_2b 22a8b02e
t1_2c 0

Working:
t2_2a 0
t2_2b 0


-- 
   Summary: Expressions result is wrong
   Product: gcc
   Version: 4.1.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peter at xmos dot com
 GCC build triplet: gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)
  GCC host triplet: Linux 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:56:44 EST 2007
x86_64 x
GCC target triplet: Target: x86_64-redhat-linux


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



[Bug tree-optimization/15346] [tree-ssa] combine two successive divisions

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2008-04-29 10:05 ---
tree-ssa-reassoc can/should be extended to do this.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-05-05 08:50:24 |2008-04-29 10:05:04
   date||


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



[Bug tree-optimization/14847] [tree-ssa] combine "if (a & 1) goto there" and "if (a & 4) goto there"

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2008-04-29 10:01 ---
The ifcombine pass would do this since 4.3.0 if there were not an extra
conversion
for a bittest of bit zero:

:
  a.0_2 = (int) a_1(D);
  D.1556_3 = a.0_2 & 1;
  if (D.1556_3 != 0)
goto  (heaven);
  else
goto ;

:
  D.1558_5 = a_1(D) & 4;
  if (D.1558_5 != 0)
goto  (heaven);
  else
goto ;

this is probably due to fold.  I will have a look.

For

void
foo (unsigned int a)
{
  if (a & 2)
goto heaven;
  if (a & 4)
goto heaven;
  return;

 heaven:
  bar ();
}

this is optimized to

optimizing bits or bits test to a_1(D) & T != 0
with temporary T = 4 | 2
Merging blocks 2 and 3
foo (unsigned int a)
{
  unsigned int D.1583;
  unsigned int D.1556;
  unsigned int D.1555;

:
  D.1555_2 = a_1(D) & 2;
  D.1556_3 = a_1(D) & 4;
  D.1583_5 = a_1(D) & 6;
  if (D.1583_5 != 0)
goto  (heaven);
  else
goto ;

Invalid sum of incoming frequencies 6100, should be 7231
heaven:;
  bar ();

:
Invalid sum of incoming frequencies 11131, should be 1
  return;

}


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-02-05 21:36:17 |2008-04-29 10:01:23
   date||


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



[Bug tree-optimization/32120] missed PRE/FRE of a*2+4 and (a+2)*2

2008-04-29 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2008-04-29 09:55 ---
For the testcase in comment #4 after FRE we have

  c_2 = a_1(D) + 4;
  d_3 = c_2 * 2;
  e_4 = a_1(D) * 2;
  f_5 = e_4 + 4;
  D.1557_6 = f_5 + d_3;
  return D.1557_6;

And a patched reassoc pass then produces

  c_2 = a_1(D) + a_1(D);
  D.1565_8 = c_2 + 4;
  D.1565_9 = D.1565_8 * 2;
  D.1557_6 = 4 + D.1565_9;
  return D.1557_6;

which is ((a + a) + 4) * 2 + 4.

The original testcase gets optimized to

  return (a + 2) * 2 == a * 2 + 4;

which makes this bug related to PR15255 which is about missing foldings.

tree-ssa-reassoc should also transform (a + C1) * C2 to a * 2 + C3.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||15255
 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2007-05-28 10:27:18 |2008-04-29 09:55:58
   date||


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



[Bug c++/35986] [4.1/4.2/4.3/4.4 regression] ICE with ambiguous template functions

2008-04-29 Thread jakub at gcc dot gnu dot org


--- Comment #1 from jakub at gcc dot gnu dot org  2008-04-29 09:19 ---
Testing a fix.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
   |dot org |
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-04-29 09:19:44
   date||


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



[Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] Can't bind ref-to-function through using-decl. in namespace

2008-04-29 Thread jakub at gcc dot gnu dot org


--- Comment #5 from jakub at gcc dot gnu dot org  2008-04-29 09:06 ---
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug c++/35987] [4.1/4.2/4.3/4.4 regression] ICE with invalid if-condition

2008-04-29 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2008-04-29 09:05 ---
Fixed.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] Can't bind ref-to-function through using-decl. in namespace

2008-04-29 Thread jakub at gcc dot gnu dot org


--- Comment #4 from jakub at gcc dot gnu dot org  2008-04-29 08:59 ---
Subject: Bug 35650

Author: jakub
Date: Tue Apr 29 08:58:58 2008
New Revision: 134789

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134789
Log:
PR c++/35650
* parser.c (cp_parser_lookup_name): Look through single function
OVERLOAD.

* g++.dg/init/ref17.C: New test.

Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/init/ref17.C
Modified:
branches/gcc-4_3-branch/gcc/cp/ChangeLog
branches/gcc-4_3-branch/gcc/cp/parser.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug c++/35650] [4.1/4.2/4.3/4.4 Regression] Can't bind ref-to-function through using-decl. in namespace

2008-04-29 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2008-04-29 08:59 ---
Subject: Bug 35650

Author: jakub
Date: Tue Apr 29 08:58:20 2008
New Revision: 134788

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134788
Log:
PR c++/35650
* parser.c (cp_parser_lookup_name): Look through single function
OVERLOAD.

* g++.dg/init/ref17.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/init/ref17.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug c++/35987] [4.1/4.2/4.3/4.4 regression] ICE with invalid if-condition

2008-04-29 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2008-04-29 08:57 ---
Subject: Bug 35987

Author: jakub
Date: Tue Apr 29 08:56:27 2008
New Revision: 134787

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134787
Log:
PR c++/35987
* typeck.c (cp_build_modify_expr) : Don't build
COMPOUND_EXPR if the second argument would be error_mark_node.

* g++.dg/other/error28.C: New test.

Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/other/error28.C
Modified:
branches/gcc-4_3-branch/gcc/cp/ChangeLog
branches/gcc-4_3-branch/gcc/cp/typeck.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug c++/35987] [4.1/4.2/4.3/4.4 regression] ICE with invalid if-condition

2008-04-29 Thread jakub at gcc dot gnu dot org


--- Comment #1 from jakub at gcc dot gnu dot org  2008-04-29 08:55 ---
Subject: Bug 35987

Author: jakub
Date: Tue Apr 29 08:54:45 2008
New Revision: 134786

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134786
Log:
PR c++/35987
* typeck.c (cp_build_modify_expr) : Don't build
COMPOUND_EXPR if the second argument would be error_mark_node.

* g++.dg/other/error28.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/other/error28.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug rtl-optimization/35542] [4.3 Regression] fwprop only propagates one operand

2008-04-29 Thread aoliva at gcc dot gnu dot org


--- Comment #7 from aoliva at gcc dot gnu dot org  2008-04-29 08:19 ---
Subject: Bug 35542

Author: aoliva
Date: Tue Apr 29 08:18:36 2008
New Revision: 134782

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134782
Log:
* fwprop.c (forward_propagate_and_simplify): Replace entire
var location rtx.  Revert part of 2007-11-08 obviated by:
2008-04-02  Andy Hutchinson <[EMAIL PROTECTED]>
PR rtl-optimization/35542
* fwprop.c (forward_propagate_and_simplify): Replace
loc_reg_mentioned_in_p with reg_mentioned_p.

Modified:
branches/var-tracking-assignments-branch/gcc/ChangeLog.vta
branches/var-tracking-assignments-branch/gcc/fwprop.c


-- 


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