[Bug c/36970] New: GCC should display a warning when trying to free a static array

2008-07-30 Thread nair dot sajish at gmail dot com
On Tue, Jul 01, 2008 at 11:37:05AM +, Joseph S. Myers wrote:
> On Tue, 1 Jul 2008, Michael Meissner wrote:
> 
> > On Tue, Jul 01, 2008 at 11:50:58AM +0200, Denys Vlasenko wrote:
> > > On Tuesday 01 July 2008 09:24, Sajish V wrote:
> > > > Thanks for the reply, Denys.
> > > > My question was, why doesn't gcc catch it during compilation? It is 
> > > > clear
> > > > that we are trying to free a variable from stack. Shouldn't gcc flag an
> > > > error for this during compilation?
> > 
> > It could.  Nobody has written the code to do so, and as they say patches are
> > welcome (assuming you have done the paperwork to legally contribute to GCC).
> > Have you filed a feature request via bugzilla so that it can be tracked?
> 
> An error is inappropriate; undefined behavior only occurs on execution of 
> the call to free, not on compilation of the program.  A warning would be 
> fine (as would converting the call to free into an abort).

True enough from a standards point of view.  Obviously having a warning would
allow some invalid code to be detected at compilation time.

-- 
Michael Meissner
email: [EMAIL PROTECTED]
http://www.the-meissners.org

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

Thanks for the reply, Denys.
My question was, why doesn't gcc catch it during compilation? It is clear that
we are trying to free a variable from stack. Shouldn't gcc flag an error for
this during compilation?
Regards,
Sajish.



- Original Message 
From: Denys Vlasenko <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Cc: Sajish V <[EMAIL PROTECTED]>
Sent: Tuesday, July 1, 2008 2:44:06 PM
Subject: Re: free (static_array)

On Tuesday 01 July 2008 08:38, Sajish V wrote:
> Hi All, 
> Can you please let me know why GCC does not crib when we try to free a static 
> array?
> main ()
> { 
>  char array[100];
>  free (array);
> }
> The above code compiles without any hitch. 
> Thanks,
> Sajish.

# ./a.out
*** glibc detected *** ./a.out: free(): invalid pointer: 0xffa8b530 ***
=== Backtrace: =
/lib/libc.so.6[0xf7ecb7a7]
/lib/libc.so.6(__libc_free+0x79)[0xf7ecc0ad]
./a.out[0x804834e]
/lib/libc.so.6(__libc_start_main+0x138)[0xf7e8da74]
./a.out[0x80482b5]
=== Memory map: 
08048000-08049000 r-xp  08:06 1315925   
/.local/tmp/a.out
08049000-0804a000 rwxp  08:06 1315925   
/.local/tmp/a.out
0804a000-0806b000 rwxp 0804a000 00:00 0  [heap]
f7e6f000-f7e76000 r-xp  08:05 46193 
/app/gcc-3.3.3/lib/libgcc_s.so.1
f7e76000-f7e77000 rwxp 6000 08:05 46193 
/app/gcc-3.3.3/lib/libgcc_s.so.1
f7e77000-f7e78000 rwxp f7e77000 00:00 0
f7e78000-f7f6 r-xp  08:0

--
vda

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

Hi All, 
Can you please let me know why GCC does not crib when we try to free a static
array?
main ()
{ 
 char array[100];
 free (array);
}
The above code compiles without any hitch. 
Thanks,
Sajish.


-- 
   Summary: GCC should display a warning when trying to free a
static array
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nair dot sajish at gmail dot com


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



[Bug c/34389] -Wconversion produces wrong warning

2008-07-30 Thread manu at gcc dot gnu dot org


--- Comment #11 from manu at gcc dot gnu dot org  2008-07-30 08:31 ---
Subject: Bug 34389

Author: manu
Date: Wed Jul 30 08:30:32 2008
New Revision: 138296

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138296
Log:
2008-07-30  Manuel Lopez-Ibanez  <[EMAIL PROTECTED]>

PR 34389
* c-typeck.c (build_binary_op): Encapsulate code into...
* c-common.c (shorten_binary_op): ...this new function.
(conversion_warning): Use the new function. Handle non-negative
constant in bitwise-and.
* c-common.h (shorten_binary_op): Declare.
cp/
* typeck.c (build_binary_op): Encapsulate code into
shorten_binary_op.
testsuite/
* gcc.dg/Wconversion-pr34389.c: New.
* g++.dg/warn/Wconversion-pr34389.C: New.

Added:
trunk/gcc/testsuite/g++.dg/warn/Wconversion-pr34389.C
trunk/gcc/testsuite/gcc.dg/Wconversion-pr34389.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.c
trunk/gcc/c-common.h
trunk/gcc/c-typeck.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug c/34389] -Wconversion produces wrong warning

2008-07-30 Thread manu at gcc dot gnu dot org


--- Comment #12 from manu at gcc dot gnu dot org  2008-07-30 08:36 ---
This should be mostly fixed except the following testcase in C++:

short  mask1(short x)
{
  short y = 0x7fff;
  return x & y; /* { dg-bogus "conversion" "conversion" { xfail *-*-* } 8 } */
}

This works in C, so it seems "same_type" does different things in C and in C++.
I don't have time to investigate this at the moment so any help is appreciated.


-- 


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



[Bug c/36970] GCC should display a warning when trying to free a static array

2008-07-30 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||diagnostic
   Last reconfirmed|-00-00 00:00:00 |2008-07-30 08:43:26
   date||


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



[Bug c++/36971] New: Portability issue from gcc 2.96 to gcc 4.1.1 for c++ casting

2008-07-30 Thread shyam_77_2000 at yahoo dot com
Hello i have code working in gcc 2.96 and porting it to gcc 4.1.1 gives me a
complete different result; please suggest what should i change in my code to
make to portable for gcc 4.1.1 specific

//code that was working in  gcc 2.96
#include
#include
#include
using namespace std;
typedef struct c
{
int a;
int b;
char bb[0];
};

class d:public c
{
public:
virtual ~d(){;}
std::string xyz;
short yy;
virtual void hello()
{
cout<<"hello"b = 6;

d *ptr = reinterpret_cast (c1);
cout

[Bug tree-optimization/30334] Request for -Wundefined

2008-07-30 Thread manu at gcc dot gnu dot org


--- Comment #15 from manu at gcc dot gnu dot org  2008-07-30 09:15 ---
Fix depends, add keyword, add alias "Wundefined".


-- 

manu at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||986, 12242, 29465, 30457
OtherBugsDependingO|986, 12242, 29465, 30457|
  nThis||
   Keywords||diagnostic, meta-bug


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



[Bug tree-optimization/36218] [4.2/4.3/4.4 regression] VRP causes stack overflow while building libgcj

2008-07-30 Thread aph at gcc dot gnu dot org


--- Comment #14 from aph at gcc dot gnu dot org  2008-07-30 09:23 ---
This patch limits recursion in tree-vrp.

Index: tree-vrp.c
===
--- tree-vrp.c  (revision 136670)
+++ tree-vrp.c  (working copy)
@@ -4049,6 +4049,8 @@
the predicate operands, an assert location node is added to the
list of assertions for the corresponding operands.  */

+static size_t depth;
+
 static bool
 find_conditional_asserts (basic_block bb, tree last)
 {
@@ -4062,6 +4064,10 @@
   need_assert = false;
   bsi = bsi_for_stmt (last);

+  depth++;
+  if (depth > 500)
+goto ret;
+
   /* Look for uses of the operands in each of the sub-graphs
  rooted at BB.  We need to check each of the outgoing edges
  separately, so that we know what kind of ASSERT_EXPR to
@@ -4121,6 +4127,8 @@
   FOR_EACH_SSA_TREE_OPERAND (op, last, iter, SSA_OP_USE)
 SET_BIT (found_in_subgraph, SSA_NAME_VERSION (op));

+ ret:
+  depth--;
   return need_assert;
 }



-- 


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



[Bug preprocessor/36649] [4.3/4.4 Regression] -H option doesn't work as expected

2008-07-30 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 |
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-07-29 21:26:45 |2008-07-30 09:25:01
   date||


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



[Bug tree-optimization/30334] Request for -Wundefined

2008-07-30 Thread manu at gcc dot gnu dot org


--- Comment #16 from manu at gcc dot gnu dot org  2008-07-30 09:26 ---
I think -Wundefined should warn for any potential undefined and unspecified
behaviour. I know they are not the same according to the standard but for a
practical point of view they both result in a behaviour that is not properly
defined and may change without notice. Most users do not know the difference
and I would argue that most of them don't even care. Having to distinct flags
would be cumbersome.

There are a few warnings already in GCC that would fall under this definition
and most of them are enabled by default and unconditionally. Therefore, this
warning should probably also be enabled by default as -Woverflow is.


-- 


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



[Bug c++/36406] [4.2/4.3/4.4 regression] ICE with template delete operator

2008-07-30 Thread jakub at gcc dot gnu dot org


--- Comment #2 from jakub at gcc dot gnu dot org  2008-07-30 10:20 ---
And
struct A
{
  A ();
  void *operator new (__SIZE_TYPE__, int = 0);
  template  void operator delete (void *, T);
};

template <> void A::operator delete (void *, int);

A *p = new A;

ICEs in coerce_delete_type, type is METHOD_TYPE, but it asserts FUNCTION_TYPE.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dodji at gcc dot gnu dot org


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



[Bug rtl-optimization/36365] [4.3/4.4 Regression] Hang in df_analyze

2008-07-30 Thread jakub at gcc dot gnu dot org


--- Comment #7 from jakub at gcc dot gnu dot org  2008-07-30 10:22 ---
Any progress with this?  Stage 1 will end soon...


-- 


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



[Bug bootstrap/36908] [4.4 Regression] bootstrap forever with BOOT_CFLAGS="-O2 -ftree-loop-distribution"

2008-07-30 Thread aldot at gcc dot gnu dot org


-- 

aldot at gcc dot gnu dot org changed:

   What|Removed |Added

   Keywords||wrong-code
  Known to fail||4.4.0
  Known to work||4.3.1
Summary|bootstrap forever with  |[4.4 Regression] bootstrap
   |BOOT_CFLAGS="-O2 -ftree-|forever with BOOT_CFLAGS="-
   |loop-distribution"  |O2 -ftree-loop-distribution"
   Target Milestone|--- |4.4.0


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



[Bug other/36969] MIPS: gcc-4.3.1 still fails to compile glibc w/ PR/35802 applied

2008-07-30 Thread joseph at codesourcery dot com


--- Comment #1 from joseph at codesourcery dot com  2008-07-30 10:44 ---
Subject: Re:   New: MIPS: gcc-4.3.1 still fails to compile
 glibc w/ PR/35802 applied

Please don't report bugs against 4.3.1 plus a random patch; test the 
current version of gcc-4_3-branch instead.  This should have been fixed by 
the follow-up patch:

http://gcc.gnu.org/ml/gcc-patches/2008-07/msg00874.html


-- 


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



[Bug fortran/36157] ICE in snapshot of 05/02/08 under FreeBSD i386 with IMPLICIT and function call

2008-07-30 Thread michael dot a dot richmond at nasa dot gov


--- Comment #6 from michael dot a dot richmond at nasa dot gov  2008-07-30 
10:49 ---
(In reply to comment #5)
> > The bug does not occur on snapshots released after 05/02/08
> 
> Michael, just to make sure, the reported ICE is gone for good?
> (If yes, we can close this PR ...)

I have not seen this bug in any version of gfortran other than the snapshot of
05/02/08. I am willing to close this PR, along with 36139 and 36140.


-- 


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



[Bug debug/36278] [4.2/4.3/4.4 Regression] ICE with typedef void in namespace and using the defined type in another when compiling with "-g"

2008-07-30 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 |
 Status|NEW |ASSIGNED
  Component|middle-end  |debug
   Last reconfirmed|2008-05-20 13:44:25 |2008-07-30 11:41:05
   date||


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



[Bug c++/35985] [4.2/4.3/4.4 regression] ICE with pointer to member function as base

2008-07-30 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2008-07-30 11:57 ---
Patch has been posted 3 months ago.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||mmitchel at gcc dot gnu dot
   ||org, jason at gcc dot gnu
   ||dot org


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



[Bug fortran/36157] ICE in snapshot of 05/02/08 under FreeBSD i386 with IMPLICIT and function call

2008-07-30 Thread dfranke at gcc dot gnu dot org


--- Comment #7 from dfranke at gcc dot gnu dot org  2008-07-30 12:05 ---
> I have not seen this bug in any version of gfortran other than the snapshot
> of 05/02/08. I am willing to close this PR, along with 36139 and 36140.

Closing this PR (and the others) as WORKSFORME.
Thanks for the feedback.


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WORKSFORME
   Target Milestone|--- |4.4.0


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



[Bug fortran/36139] ICE in snapshot of 05/02/08 under HPPA Linux with IMPLICIT, PARAMETER, and function call

2008-07-30 Thread dfranke at gcc dot gnu dot org


--- Comment #5 from dfranke at gcc dot gnu dot org  2008-07-30 12:07 ---
Closing as WORKSFORME - the reporter can not reproduce the problem (see
PR36157, comment #6).


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME
   Target Milestone|--- |4.4.0


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



[Bug fortran/36140] ICE in snapshot of 05/02/08 under MIPS Linux with IMPLICIT LOGICAL and function call

2008-07-30 Thread dfranke at gcc dot gnu dot org


--- Comment #3 from dfranke at gcc dot gnu dot org  2008-07-30 12:07 ---
Closing as WORKSFORME - the reporter can not reproduce the problem (see
PR36157, comment #6).


-- 

dfranke at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||WORKSFORME
   Target Milestone|--- |4.4.0


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



[Bug rtl-optimization/36972] New: Redundant creation of stack fram on spu-gcc

2008-07-30 Thread eres at il dot ibm dot com
Running the testcase from PR33927 on spu-gcc 4.4.0 2008062 generates the
following code which contains a redundant creation of stack frame:

test1:
fa  $3,$3,$4
stqd$sp,-48($sp)
ai  $sp,$sp,-48
lnop
ai  $sp,$sp,48
bi  $lr
.size   test1, .-test1
.align  3
.global test2
.type   test2, @function
test2:
fa  $4,$4,$4
stqd$sp,-128($sp)
fa  $3,$3,$3
ai  $sp,$sp,-128
ai  $sp,$sp,128
bi  $lr
.size   test2, .-test2
.ident  "GCC: (GNU) 4.4.0 20080629 (experimental)"


Here is again the testcase from PR33297:

#define vector __attribute__((__vector_size__(16) ))

typedef vector float vec_float4;
typedef struct {
vec_float4 data;
} VecFloat4;

typedef struct {
vec_float4 a;
vec_float4 b;
} VecFloat4x2;


VecFloat4 test1(VecFloat4 a, VecFloat4 b)
{
a.data = a.data+b.data;
return a;
}


VecFloat4x2 test2(VecFloat4x2 data)
{
data.a = data.a+data.a;
data.b = data.b+data.b;
return data;
}


-- 
   Summary: Redundant creation of stack fram on spu-gcc
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eres at il dot ibm dot com
  GCC host triplet: spu-gcc


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



[Bug c++/35324] [4.2/4.3/4.4 regression] Invalid argument to sizeof not rejected in template

2008-07-30 Thread jakub at gcc dot gnu dot org


--- Comment #3 from jakub at gcc dot gnu dot org  2008-07-30 12:39 ---
I think there are many bugs that are only reported when a template is
instantiated, and this is just one of them.
If you add
B b;
to the testcase, it will be rejected.  IMHO this isn't a bug.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||jason at gcc dot gnu dot org


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



[Bug preprocessor/35322] [4.2/4.3 regression] ICE with incomplete macro

2008-07-30 Thread jakub at gcc dot gnu dot org


--- Comment #8 from jakub at gcc dot gnu dot org  2008-07-30 12:40 ---
I agree there is no need to fix this on the older branches.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

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


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



[Bug ada/5911] Support for multilib in Ada

2008-07-30 Thread ebotcazou at gcc dot gnu dot org


--- Comment #20 from ebotcazou at gcc dot gnu dot org  2008-07-30 13:00 
---
Note that changes to gnattools/ are to be described in gnattools/ChangeLog.


-- 


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



[Bug c++/36767] [4.3/4.4 Regression] Segmentation fault with -fprofile-arcs -O2

2008-07-30 Thread dodji at gcc dot gnu dot org


--- Comment #14 from dodji at gcc dot gnu dot org  2008-07-30 13:09 ---
Subject: Bug 36767

Author: dodji
Date: Wed Jul 30 13:07:50 2008
New Revision: 138308

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138308
Log:
2008-07-30  Dodji Seketeli  <[EMAIL PROTECTED]>

PR c++/36767
* decl2.c (fix_temporary_vars_context_r): New function.
 (one_static_initialization_or_destruction): Make sure temporary
 variables part of the initialiser have their DECL_CONTEXT()
 properly set.


Added:
trunk/gcc/testsuite/g++.dg/parse/crash42.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug ada/5911] Support for multilib in Ada

2008-07-30 Thread bonzini at gnu dot org


--- Comment #21 from bonzini at gnu dot org  2008-07-30 13:10 ---
Yes, I already moved the relevant entry to gnattools/ChangeLog.


-- 


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



[Bug ada/5910] Ada libraries are not built by "make all" from top level.

2008-07-30 Thread bonzini at gnu dot org


--- Comment #6 from bonzini at gnu dot org  2008-07-30 13:12 ---
reopened just because it is not a dup of PR5911...


-- 

bonzini at gnu dot org changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|DUPLICATE   |


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



[Bug ada/5910] Ada libraries are not built by "make all" from top level.

2008-07-30 Thread bonzini at gnu dot org


--- Comment #7 from bonzini at gnu dot org  2008-07-30 13:12 ---
... and closed because it was fixed by the introduction of libaad


-- 

bonzini at gnu dot org changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


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



[Bug c++/36767] [4.3/4.4 Regression] Segmentation fault with -fprofile-arcs -O2

2008-07-30 Thread dodji at gcc dot gnu dot org


--- Comment #15 from dodji at gcc dot gnu dot org  2008-07-30 13:19 ---
Subject: Bug 36767

Author: dodji
Date: Wed Jul 30 13:18:31 2008
New Revision: 138309

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138309
Log:
2008-07-30  Dodji Seketeli  <[EMAIL PROTECTED]>

PR c++/36767
* decl2.c (fix_temporary_vars_context_r): New function.
 (one_static_initialization_or_destruction): Make sure temporary
 variables part of the initialiser have their DECL_CONTEXT()
 properly set.


Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/parse/crash41.C
Modified:
branches/gcc-4_3-branch/gcc/cp/ChangeLog
branches/gcc-4_3-branch/gcc/cp/decl2.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog


-- 


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



[Bug c/36970] GCC should display a warning when trying to free a static array

2008-07-30 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 |
 Status|NEW |ASSIGNED
   Last reconfirmed|2008-07-30 08:43:26 |2008-07-30 13:27:50
   date||


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



[Bug c/36973] New: ICE when compiling legal(at least compiles with 4.1.2) code

2008-07-30 Thread r0bertz at gentoo dot org
ICE when compiling legal(at least compiles with 4.1.2) code
I will attach the preprocessed compilation unit.


-- 
   Summary: ICE when compiling legal(at least compiles with 4.1.2)
code
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: r0bertz at gentoo dot org
 GCC build triplet: mipsel-unknown-linux-gnu
  GCC host triplet: mipsel-unknown-linux-gnu
GCC target triplet: mipsel-unknown-linux-gnu


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



[Bug c/36973] ICE when compiling legal(at least compiles with 4.1.2) code

2008-07-30 Thread r0bertz at gentoo dot org


--- Comment #1 from r0bertz at gentoo dot org  2008-07-30 13:49 ---
configured with:
/var/tmp/portage/sys-devel/gcc-4.4.0_alpha20080718/work/gcc-4.4-20080718/configure
--prefix=/usr
--bindir=/usr/mipsel-unknown-linux-gnu/gcc-bin/4.4.0-alpha20080718
--includedir=/usr/lib/gcc/mipsel-unknown-linux-gnu/4.4.0-alpha20080718/include
--datadir=/usr/share/gcc-data/mipsel-unknown-linux-gnu/4.4.0-alpha20080718
--mandir=/usr/share/gcc-data/mipsel-unknown-linux-gnu/4.4.0-alpha20080718/man
--infodir=/usr/share/gcc-data/mipsel-unknown-linux-gnu/4.4.0-alpha20080718/info
--with-gxx-include-dir=/usr/lib/gcc/mipsel-unknown-linux-gnu/4.4.0-alpha20080718/include/g++-v4
--host=mipsel-unknown-linux-gnu --build=mipsel-unknown-linux-gnu
--disable-altivec --enable-nls --without-included-gettext --with-system-zlib
--disable-checking --disable-werror --enable-secureplt --disable-multilib
--enable-libmudflap --disable-libssp --enable-cld --disable-libgcj
--enable-languages=c,c++ --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo
4.4.0_alpha20080718'


-- 


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



[Bug c/36973] ICE when compiling legal(at least compiles with 4.1.2) code

2008-07-30 Thread r0bertz at gentoo dot org


--- Comment #2 from r0bertz at gentoo dot org  2008-07-30 13:52 ---
Created an attachment (id=15977)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15977&action=view)
preprocessed source file


-- 


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



[Bug c/36973] ICE when compiling legal(at least compiles with 4.1.2) code

2008-07-30 Thread r0bertz at gentoo dot org


--- Comment #3 from r0bertz at gentoo dot org  2008-07-30 13:53 ---
mipsel-unknown-linux-gnu-gcc -c -O2 -march=loongson2f -mabi=32 -pipe -W -Wall
-DHAVE_CONFIG_H -I. -I. -I../include -I../include -D_REENTRANT
-DPATH_SANE_CONFIG_DIR=/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/share
-DPATH_SANE_LOCK_DIR=/var/lib/lock/sane -DV_MAJOR=1 -DV_MINOR=0
-DBACKEND_NAME=hp3900 -DLIBDIR=/usr/lib/sane hp3900.c  -fPIC -DPIC -o
.libs/hp3900.o


-- 


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



[Bug c++/36767] [4.3/4.4 Regression] Segmentation fault with -fprofile-arcs -O2

2008-07-30 Thread jakub at gcc dot gnu dot org


--- Comment #16 from jakub at gcc dot gnu dot org  2008-07-30 13:53 ---
Fixed, thanks.


-- 

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



[Bug c/36973] ICE when compiling legal(at least compiles with 4.1.2) code

2008-07-30 Thread r0bertz at gentoo dot org


--- Comment #4 from r0bertz at gentoo dot org  2008-07-30 13:55 ---
the exact error message is:
hp3900.c: In function 'fitcalibrate_get':
hp3900.c:61: internal compiler error: Segmentation fault


sorry for sending so many times.
this is my first time to file gcc bugs.
i will send all needed info in one post next time.


-- 


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



[Bug tree-optimization/36967] [4.4 Regression] segfault in is_gimple_real_type with -fpredictive-commoning -ffast-math

2008-07-30 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2008-07-30 14:46 ---
well...

(gdb) call debug_tree (t)
 def_stmt 

version 447 in-free-list>

we release the SSA_NAME with remove_phi_node (&psi, true); before then
examining its uses ...

We forget to do so for the other stmts we remove.

An easy way out is to fix the tuplification.


-- 

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|2008-07-29 21:11:19 |2008-07-30 14:46:12
   date||


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



[Bug middle-end/30774] [4.2/4.3/4.4 regression] ld: fatal: too many symbols require `small' PIC references

2008-07-30 Thread jakub at gcc dot gnu dot org


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

   Priority|P3  |P4


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



[Bug target/35866] Vector load/store from a packed struct does not work (without -mstrict-align)

2008-07-30 Thread froydnj at gcc dot gnu dot org


--- Comment #5 from froydnj at gcc dot gnu dot org  2008-07-30 15:32 ---
Subject: Bug 35866

Author: froydnj
Date: Wed Jul 30 15:30:59 2008
New Revision: 138316

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138316
Log:
PR target/35866

* config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Add clause for
vector modes.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.h


-- 


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



[Bug c/19541] need another option to support what -I- did just besides -iquote

2008-07-30 Thread dvilleneuve at kronos dot com


--- Comment #10 from dvilleneuve at kronos dot com  2008-07-30 15:39 ---
An updated patch for gcc 4.3 is available in the following message:

http://gcc.gnu.org/ml/gcc-patches/2007-03/msg00653.html


-- 


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



[Bug bootstrap/36974] New: [4.4 Regression]: Gcc failed to bootstrap

2008-07-30 Thread hjl dot tools at gmail dot com
Gcc 4.4 revision 138310 failed to bootstrap on Linux/ia64:

./../../src/libgcc/../gcc/libgcc2.c: In function '__addvsi3':
../../../src/libgcc/../gcc/libgcc2.c:104: internal compiler error: in
call_from_call_insn, at final.c:1760
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[5]: *** [_addvsi3.o] Error 1

I think it is introduced by revision 138310:

http://gcc.gnu.org/ml/gcc-cvs/2008-07/msg01023.html

Revision 138296 is OK.


-- 
   Summary: [4.4 Regression]: Gcc failed to bootstrap
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: ia64-unknown-linux-gnu


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



[Bug tree-optimization/36967] [4.4 Regression] segfault in is_gimple_real_type with -fpredictive-commoning -ffast-math

2008-07-30 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2008-07-30 15:45 ---
Subject: Bug 36967

Author: rguenth
Date: Wed Jul 30 15:43:42 2008
New Revision: 138318

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

PR tree-optimization/36967
* tree-predcom.c (remove_stmt): Use gimple_assign_ssa_name_copy_p.
Release defs of statements we remove.

* gfortran.dg/pr36967.f: New testcase.

Added:
trunk/gcc/testsuite/gfortran.dg/pr36967.f
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-predcom.c


-- 


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



[Bug tree-optimization/36967] [4.4 Regression] segfault in is_gimple_real_type with -fpredictive-commoning -ffast-math

2008-07-30 Thread rguenth at gcc dot gnu dot org


--- Comment #4 from rguenth at gcc dot gnu dot org  2008-07-30 16:04 ---
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=36967



[Bug middle-end/36826] [4.4 Regression] ICE in fold_convert, at fold-const.c:2528

2008-07-30 Thread rguenth at gcc dot gnu dot org


--- Comment #6 from rguenth at gcc dot gnu dot org  2008-07-30 16:05 ---
Fixed by the tuples merge.


-- 

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



[Bug bootstrap/36974] [4.4 Regression]: Gcc failed to bootstrap

2008-07-30 Thread hjl dot tools at gmail dot com


--- Comment #1 from hjl dot tools at gmail dot com  2008-07-30 16:24 ---
[EMAIL PROTECTED] libgcc]$ cat foo.i
extern void abort (void);
typedef int SItype __attribute__ ((mode (SI)));
typedef unsigned int USItype __attribute__ ((mode (SI)));
SItype
__addvsi3 (SItype a, SItype b)
{
  const SItype w = (USItype) a + (USItype) b;

  if (b >= 0 ? w < a : w > a)
abort ();

  return w;
}
[EMAIL PROTECTED] libgcc]$ ../../gcc/xgcc -B../../gcc/ -O -S foo.i
foo.i: In function ‘__addvsi3’:
foo.i:13: internal compiler error: in call_from_call_insn, at final.c:1760
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
[EMAIL PROTECTED] libgcc]$ 


-- 


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



[Bug bootstrap/36974] [4.4 Regression]: Gcc failed to bootstrap

2008-07-30 Thread hjl dot tools at gmail dot com


--- Comment #2 from hjl dot tools at gmail dot com  2008-07-30 16:26 ---
call_from_call_insn doesn't support:

(gdb) b fancy_abort 
Breakpoint 1 at 0x40317081: file ../../src/gcc/diagnostic.c, line 689.
(gdb) r
Starting program: /export/gnu/import/svn/gcc-test/bld/gcc/cc1 -fpreprocessed
foo.i -quiet -dumpbase foo.i -auxbase foo -O -version -o foo.s
GNU C (GCC) version 4.4.0 20080730 (experimental) [trunk revision 138310]
(ia64-unknown-linux-gnu)
compiled by GNU C version 4.1.2 20071124 (Red Hat 4.1.2-42), GMP
version 4.2.2, MPFR version 2.3.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: fd482fe43a51139098c909d8f96fdc49

Breakpoint 1, fancy_abort (file=0x4145bf10 "../../src/gcc/final.c", 
line=1760, function=0x4145c000 "call_from_call_insn")
at ../../src/gcc/diagnostic.c:689
689   internal_error ("in %s, at %s:%d", function, trim_filename (file),
line);
(gdb) f 1
#1  0x40458050 in call_from_call_insn (insn=0x23c8d310)
at ../../src/gcc/final.c:1760
1760  gcc_unreachable ();
(gdb) call debug_rtx (insn)
(call_insn 51 83 84 5 foo.i:10 (cond_exec (eq (reg:BI 262 p6 [353])
(const_int 0 [0x0]))
(parallel [
(call (mem:DI (symbol_ref:DI ("abort") [flags 0x41]
) [0 S8 A64])
(const_int 0 [0x0]))
(clobber (reg:DI 320 b0))
])) 1114 {divdf3_internal_thr+317} (expr_list:REG_BR_PROB
(const_int 100 [0x64])
(expr_list:REG_EH_REGION (const_int 0 [0x0])
(expr_list:REG_NORETURN (const_int 0 [0x0])
(nil
(expr_list:REG_DEP_TRUE (use (reg:DI 1 r1))
(nil)))
(gdb) 


-- 


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



[Bug ada/5911] Support for multilib in Ada

2008-07-30 Thread laurent at guerby dot net


--- Comment #22 from laurent at guerby dot net  2008-07-30 16:32 ---
Sorry about the misplaced ChangeLog


-- 


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



gcc-4.2.2 generating wrong/misaligned sse instruction - movapd

2008-07-30 Thread CH Gowri Kumar - గౌరీ కుమార్
Hi all,
gcc-4.2.2 seems to generating wrong/misaligned code for movapd.

I have used the same test case mentione here (for almost the similar bug)
http://gcc.gnu.org/bugzilla/attachment.cgi?id=6012


The relavent information about the version and the files are as follows:

The version of gcc:
gcc -v
Using built-in specs.
Target: i386-redhat-linux
Configured with: ../../src/gcc-4.2.2/configure
--prefix=/depot/gcc-4.2.2-static --disable-shared
--enable-threads=posix --disable-checking --with-system-zlib
--enable-__cxa_atexit --disable-libunwind-exceptions
--enable-languages=c,c++,objc,fortran --with-cpu=generic
--host=i386-redhat-linux
Thread model: posi

$ gcc -g -O2 -funsigned-bitfields -fsigned-char -ffloat-store -Wformat
 -msse2 -mfpmath=sse  -c sse.c
$ objdump -Sd sse.o > sse_asm.txt

$ grep movapd sse_asm.txt
  a3:   66 0f 28 c2 movapd %xmm2,%xmm0
  cb:   66 0f 28 c1 movapd %xmm1,%xmm0
  f6:   66 0f 28 c4 movapd %xmm4,%xmm0
 165:   66 0f 29 9d 38 fe ffmovapd %xmm3,0xfe38(%ebp) #<
 185:   66 0f 28 9d 38 fe ffmovapd 0xfe38(%ebp),%xmm3


Is this a known issue? If so, is there are there any suggested
workarounds (other than upgrading to later versions :-) ?

Regards,
Gowri Kumar
double sin(double x);
double cos(double x);

typedef struct {
double x, y, z;
} DVECTOR;

typedef struct {
   DVECTOR m[4];
} DMATRIX;


void
create_geo_to_topo(DMATRIX *xfp, double lat, double lon)
{
double cos_lat;

{
  double sin_lon, cos_lon, sin_lat;

  sin_lon = sin(lon);
  cos_lon = cos(lon);
  sin_lat = sin(lat);
  cos_lat = cos(lat);

  xfp->m[0].x = -sin_lon;
xfp->m[1].x =  cos_lon;
xfp->m[2].x = 0.0;

xfp->m[0].y = -cos_lon  * sin_lat;
xfp->m[1].y = -sin_lon  * sin_lat;
xfp->m[2].y = cos_lat;

xfp->m[0].z = cos_lon  * cos_lat;
xfp->m[1].z = sin_lon  * cos_lat;
xfp->m[2].z = sin_lat;

{
DVECTOR geo;
DVECTOR lla;

lla.x = lat;
lla.y = lon;
lla.z = 0.0;
geo_lla_xyz( &lla, &geo);


xfp->m[3].x = -geo.x * xfp->m[0].x -
   geo.y * xfp->m[1].x -
   geo.z * xfp->m[2].x;
xfp->m[3].y = -geo.x * xfp->m[0].y -
   geo.y * xfp->m[1].y -
   geo.z * xfp->m[2].y;
xfp->m[3].z = -geo.x * xfp->m[0].z -
   geo.y * xfp->m[1].z -
   geo.z * xfp->m[2].z; 
}
}
}



sse.i
Description: Binary data


sse.s
Description: Binary data

sse.o: file format elf32-i386

Disassembly of section .text:

 :


void
create_geo_to_topo(DMATRIX *xfp, double lat, double lon)
{
   0:   55  push   %ebp
   1:   89 e5   mov%esp,%ebp
   3:   53  push   %ebx
   4:   81 ec d4 01 00 00   sub$0x1d4,%esp
   a:   8b 45 0cmov0xc(%ebp),%eax
   d:   8b 5d 08mov0x8(%ebp),%ebx
  10:   89 85 50 fe ff ff   mov%eax,0xfe50(%ebp)
  16:   8b 45 10mov0x10(%ebp),%eax
  19:   89 85 54 fe ff ff   mov%eax,0xfe54(%ebp)
  1f:   8b 45 14mov0x14(%ebp),%eax
  22:   89 85 48 fe ff ff   mov%eax,0xfe48(%ebp)
  28:   8b 45 18mov0x18(%ebp),%eax
  2b:   89 85 4c fe ff ff   mov%eax,0xfe4c(%ebp)
double cos_lat;

{
  double sin_lon, cos_lon, sin_lat;

  sin_lon = sin(lon);
  31:   f2 0f 10 85 48 fe ffmovsd  0xfe48(%ebp),%xmm0
  38:   ff 
  39:   f2 0f 11 04 24  movsd  %xmm0,(%esp)
  3e:   e8 fc ff ff ff  call   3f 
  cos_lon = cos(lon);
  43:   f2 0f 10 85 48 fe ffmovsd  0xfe48(%ebp),%xmm0
  4a:   ff 
  4b:   f2 0f 11 04 24  movsd  %xmm0,(%esp)
  50:   dd 5d e8fstpl  0xffe8(%ebp)
  53:   e8 fc ff ff ff  call   54 
  sin_lat = sin(lat);
  58:   f2 0f 10 85 50 fe ffmovsd  0xfe50(%ebp),%xmm0
  5f:   ff 
  60:   f2 0f 11 04 24  movsd  %xmm0,(%esp)
  65:   dd 5d e0fstpl  0xffe0(%ebp)
  68:   e8 fc ff ff ff  call   69 
  cos_lat = cos(lat);
  6d:   f2 0f 10 85 50 fe ffmovsd  0xfe50(%ebp),%xmm0
  74:   ff 
  75:   f2 0f 11 04 24  movsd  %xmm0,(%esp)
  7a:   dd 5d d8fstpl  0xffd8(%ebp)
  7d:   e8 fc ff ff ff  call   7e 

  xfp->m[0].x = -sin_lon;
xfp->m[1].x =  cos_lon;
xfp->m[2].x = 0.0;

xfp->m[0].y = -cos_lon  * sin_lat;
xfp->m[1].y = -sin_lon  * sin_lat;
xfp->m[2].y = cos_lat;

xfp->m[0].z = cos_lon  * cos_lat;
xfp->m[1].z = sin_lon  * cos_lat;
xfp->m[2].z = sin_lat;

{
DVECTOR geo;
DVECTOR lla;

lla.x = lat;
lla.y = lon;
lla.z = 0.0;
geo_lla_xyz( &lla, &geo);
  8

[Bug bootstrap/36974] [4.4 Regression]: Gcc failed to bootstrap

2008-07-30 Thread espindola at google dot com


--- Comment #3 from espindola at google dot com  2008-07-30 16:51 ---
Created an attachment (id=15978)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15978&action=view)
proposed fix


-- 


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



[Bug c/19541] need another option to support what -I- did just besides -iquote

2008-07-30 Thread tromey at gcc dot gnu dot org


--- Comment #11 from tromey at gcc dot gnu dot org  2008-07-30 17:44 ---
Please ping that patch on the gcc-patches list.
Thanks.


-- 


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



[Bug fortran/28662] fpp call of gfortran: -traditional-cpp versus newer macros like #x

2008-07-30 Thread burnus at gcc dot gnu dot org


--- Comment #6 from burnus at gcc dot gnu dot org  2008-07-30 18:06 ---
For an initial, incomplete patch see:
http://gcc.gnu.org/ml/fortran/2008-07/msg00248.html


-- 


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



[Bug rtl-optimization/36929] [4.3/4.4 Regression] internal compiler error: Segmentation fault

2008-07-30 Thread schwab at gcc dot gnu dot org


--- Comment #5 from schwab at gcc dot gnu dot org  2008-07-30 18:24 ---
Subject: Bug 36929

Author: schwab
Date: Wed Jul 30 18:22:50 2008
New Revision: 138333

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138333
Log:
PR rtl-optimization/36929
* dse.c (replace_inc_dec): Use emit_insn_before instead of
add_insn_before and fix argument order.
(replace_inc_dec_mem): Handle NULL rtx.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/dse.c


-- 


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



[Bug rtl-optimization/36929] [4.3/4.4 Regression] internal compiler error: Segmentation fault

2008-07-30 Thread schwab at suse dot de


--- Comment #6 from schwab at suse dot de  2008-07-30 18:24 ---
Fixed in 4.3 branch and trunk.


-- 

schwab at suse dot de changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug rtl-optimization/36929] [4.3/4.4 Regression] internal compiler error: Segmentation fault

2008-07-30 Thread schwab at gcc dot gnu dot org


--- Comment #7 from schwab at gcc dot gnu dot org  2008-07-30 18:24 ---
Subject: Bug 36929

Author: schwab
Date: Wed Jul 30 18:23:14 2008
New Revision: 138334

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138334
Log:
PR rtl-optimization/36929
* dse.c (replace_inc_dec): Use emit_insn_before instead of
add_insn_before and fix argument order.
(replace_inc_dec_mem): Handle NULL rtx.

Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/dse.c


-- 


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



[Bug middle-end/34216] [4.2 regression] Optimizations cause audio distortion in GSM decompression

2008-07-30 Thread gcc-gnu-org at the-tilghman dot com


--- Comment #7 from gcc-gnu-org at the-tilghman dot com  2008-07-30 18:38 
---
Fixed by adding noclobber to the assembly of the code in question.


-- 

gcc-gnu-org at the-tilghman dot com changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||INVALID


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



gcc-bugs@gcc.gnu.org

2008-07-30 Thread jens dot maurer at gmx dot net
overload-address.cc: In function ‘void g()’:
overload-address.cc:6: error: address of overloaded function with no contextual
type information

while compiling this:

void f(int);
void f(double);

void g()
{
   (&f)(1.0);   // well-formed, see 13.3.1.1p3 over.match.call
}


-- 
   Summary: overload resolution not applied for (&f)()
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jens dot maurer at gmx dot net
 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=36975



[Bug debug/36976] New: FAIL: g++.dg/torture/stackalign/unwind-2.C

2008-07-30 Thread hjl dot tools at gmail dot com
Some newly added stack alignment tests failed on Linux/ia32:

FAIL: g++.dg/torture/stackalign/unwind-2.C  -O1  execution test
FAIL: g++.dg/torture/stackalign/unwind-2.C  -O2  execution test
FAIL: g++.dg/torture/stackalign/unwind-2.C  -O3 -fomit-frame-pointer  execution
test
FAIL: g++.dg/torture/stackalign/unwind-2.C  -O3 -g  execution test

The discussions are at

http://gcc.gnu.org/ml/gcc-patches/2008-07/msg02133.html

The patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2008-07/msg02221.html


-- 
   Summary: FAIL: g++.dg/torture/stackalign/unwind-2.C
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: i686-pc-linux-gnu


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



[Bug debug/36977] New: Incorrect debug info for stack variables with stack alignment

2008-07-30 Thread hjl dot tools at gmail dot com
In expand_stack_alignment, we decide we need to relign stack to support
big outgoing stack boundary.  Reload will make frame pointer available
for stack alignment by eliminating it to stack pointer.  After reload,
we realize that we don't need to relign stack after all, for example,
callee doesn't need such a big incoming stack boundary, and we won't
generate the stack alignment instruction.  But as far as reload and
debug info are concerned, skipping the stack alignment instruction is a
codegen optimization and shouldn't make any difference for reload and
debug info. However, dwarf2out.c checks the stack alignment instruction
to see if stack is realigned.  When the stack alignment instruction is
omitted, based_loc_descr doesn't know it should use stack pointer + offset
to access stack variables.  I am checking in this patch to add a
stack_realign_tried field to rtl_data so that based_loc_descr can
generate debug info for stack variables even if the stack alignment
instruction is omitted.

[EMAIL PROTECTED] stack-13]$ cat bug852.c
void
marker1 ()
{

}

int
main ()
{
  struct {
char c[100];
  } cbig;

  struct {
int i[800];
  } ibig;

  struct {
long l[900];
  } lbig;

  struct {
float f[200];
  } fbig;

  struct {
double d[300];
  } dbig;

  struct {
short s[400];
  } sbig;


  ibig.i[0] = 55;
  ibig.i[100] = 5;
  cbig.c[0] = '\0';
  cbig.c[99] = 'A';
  fbig.f[100] = 11.9;
  dbig.d[202] = 9.;
  sbig.s[90] = 255;
  lbig.l[333] = 9;

  marker1 ();
  return 0;
}
[EMAIL PROTECTED] stack-13]$ make bug852
/export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-work/build-x86_64-linux/gcc/ -m32 -g-c -o bug852.o
bug852.c
/export/build/gnu/gcc-work/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-work/build-x86_64-linux/gcc/ -m32 -o bug852 bug852.o
[EMAIL PROTECTED] stack-13]$ ./gdb bug852
GNU gdb (GDB) 6.8.50.20080728-cvs
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
...
(gdb) b main
Breakpoint 1 at 0x8048382: file bug852.c, line 35.
(gdb) r
Starting program: /export/home/hjl/bugs/gcc/stack-13/bug852 

Breakpoint 1, main () at bug852.c:35
35ibig.i[0] = 55;
(gdb) next
36ibig.i[100] = 5;
(gdb) p ibig
Cannot access memory at address 0xf004
(gdb)


-- 
   Summary: Incorrect debug info for stack variables with stack
alignment
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com
GCC target triplet: i686-pc-linux-gnu


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



[Bug debug/36977] Incorrect debug info for stack variables with stack alignment

2008-07-30 Thread hjl dot tools at gmail dot com


--- Comment #1 from hjl dot tools at gmail dot com  2008-07-30 21:27 ---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2008-07/msg02351.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2008-
   ||07/msg02351.html


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



[Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr

2008-07-30 Thread jwakely dot gcc at gmail dot com


--- Comment #3 from jwakely dot gcc at gmail dot com  2008-07-30 21:27 
---
Created an attachment (id=15979)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15979&action=view)
unique_ptr and rvalue-reference updates from WP

I'm going to be offline until next week so here's what I have so far.
This adds the rvalue-references and unique_ptr changes from 20.7.12.2 in the
current WP, n2691, but I might have missed something.

While adding the new swap() overloads I realised we need to specialize swap()
for shared_ptr as well as __shared_ptr, because a user can detect the
difference by taking the address or explicitly specifying the template
parameters (the __shared_ptr overloads have an extra template param for the
lock policy.)

tested linux x86_64


-- 


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



[Bug libstdc++/36962] [C++0x] Add constructors / assignment operators from unique_ptr to shared_ptr

2008-07-30 Thread paolo dot carlini at oracle dot com


--- Comment #4 from paolo dot carlini at oracle dot com  2008-07-30 21:49 
---
Many thanks Jonathan! By the time you will be back online, my comments will be
ready and in any case will be able to commit the changes! Thanks again, Paolo.


-- 


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



[Bug target/36450] [4.4 Regression] ICE in insert_restore/insert_save with GET_MODE_ALIGNMENT mem

2008-07-30 Thread hjl dot tools at gmail dot com


--- Comment #13 from hjl dot tools at gmail dot com  2008-07-30 21:53 
---
Do you still see it after revision 38335? If you really want, you
can check MAX_SUPPORTED_STACK_ALIGNMENT, but not PREFERRED_STACK_BOUNDARY.


-- 


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



[Bug middle-end/36450] [4.4 Regression] ICE in insert_restore/insert_save with GET_MODE_ALIGNMENT mem

2008-07-30 Thread hjl dot tools at gmail dot com


--- Comment #14 from hjl dot tools at gmail dot com  2008-07-30 21:58 
---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2008-07/msg02378.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2008-
   ||07/msg02378.html
  Component|target  |middle-end


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



[Bug bootstrap/36974] [4.4 Regression]: Gcc failed to bootstrap

2008-07-30 Thread espindola at gcc dot gnu dot org


--- Comment #4 from espindola at gcc dot gnu dot org  2008-07-30 23:24 
---
Subject: Bug 36974

Author: espindola
Date: Wed Jul 30 23:23:33 2008
New Revision: 138347

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138347
Log:
2008-07-30  Rafael Avila de Espindola  <[EMAIL PROTECTED]>

PR 36974
* final.c (call_from_call_insn): Handle COND_EXEC


Modified:
trunk/gcc/ChangeLog
trunk/gcc/final.c


-- 


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



[Bug tree-optimization/36978] New: ICE in gimple_cond_set_lhs for -O2 -funswitch-loops after tuples merge

2008-07-30 Thread janis at gcc dot gnu dot org
The following C testcase was reduced from a C++ benchmark:

  unsigned short status;
  void foo (const _Bool flag)
  {
if (status == 2 || status == 7)
  {
while (status != 2 && (status != 7 || !flag))
  {
  }
  }
  }

After the merge of the tuples branch into mainline it gets the following ICE on
powerpc-linux with -O3 or with the options shown here:

elm3b149% /home/janis/tools/gcc-trunk-anonsvn/bin/gcc -c -O2 -funswitch-loops
bug.c
bug.c: In function ‘foo’:
bug.c:4: internal compiler error: in gimple_cond_set_lhs, at gimple.h:2251
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.


-- 
   Summary: ICE in gimple_cond_set_lhs for -O2 -funswitch-loops
after tuples merge
   Product: gcc
   Version: 4.4.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janis at gcc dot gnu dot org
GCC target triplet: powerpc-unknown-linux-gnu


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



[Bug tree-optimization/36978] [4.4 Regression] ICE in gimple_cond_set_lhs for -O2 -funswitch-loops after tuples merge

2008-07-30 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
Summary|ICE in gimple_cond_set_lhs  |[4.4 Regression] ICE in
   |for -O2 -funswitch-loops|gimple_cond_set_lhs for -O2
   |after tuples merge  |-funswitch-loops after
   ||tuples merge
   Target Milestone|--- |4.4.0


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



[Bug ada/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges

2008-07-30 Thread ebotcazou at gcc dot gnu dot org


--- Comment #8 from ebotcazou at gcc dot gnu dot org  2008-07-30 23:39 
---
Recategorizing.


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

  Component|middle-end  |ada


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



[Bug tree-optimization/36978] [4.4 Regression] ICE in gimple_cond_set_lhs for -O2 -funswitch-loops after tuples merge

2008-07-30 Thread pinskia at gcc dot gnu dot org


--- Comment #1 from pinskia at gcc dot gnu dot org  2008-07-30 23:53 ---
Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2008-07-30 23:53:12
   date||


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



[Bug ada/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges

2008-07-30 Thread ebotcazou at gcc dot gnu dot org


--- Comment #9 from ebotcazou at gcc dot gnu dot org  2008-07-30 23:56 
---
Subject: Bug 36554

Author: ebotcazou
Date: Wed Jul 30 23:54:56 2008
New Revision: 138348

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138348
Log:
PR ada/36554
* dwarf2out.c (is_subrange_type): Deal with BOOLEAN_TYPE.
ada/
* back_end.adb (Call_Back_End): Pass Standard_Boolean to gigi.
* gcc-interface/gigi.h (gigi): Take new standard_boolean parameter.
* gcc-interface/decl.c (gnat_to_gnu_entity) :
Set precision to 1 for subtype of BOOLEAN_TYPE.
(set_rm_size): Set TYPE_RM_SIZE_NUM for BOOLEAN_TYPE.
(make_type_from_size): Deal with BOOLEAN_TYPE.
* gcc-interface/misc.c (gnat_print_type): Likewise.
* gcc-interface/trans.c (gigi): Take new standard_boolean parameter.
Set boolean_type_node as its translation in the table, as well
as boolean_false_node for False and boolean_true_node for True.
* gcc-interface/utils.c (gnat_init_decl_processing): Create custom
8-bit boolean_type_node and set its TYPE_RM_SIZE_NUM.
(create_param_decl): Deal with BOOLEAN_TYPE.
(build_vms_descriptor): Likewise.
(build_vms_descriptor64): Likewise.
(convert): Deal with BOOLEAN_TYPE like with ENUMERAL_TYPE.

Added:
trunk/gcc/testsuite/gnat.dg/boolean_expr.adb
trunk/gcc/testsuite/gnat.dg/boolean_expr.ads
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/back_end.adb
trunk/gcc/ada/gcc-interface/decl.c
trunk/gcc/ada/gcc-interface/gigi.h
trunk/gcc/ada/gcc-interface/misc.c
trunk/gcc/ada/gcc-interface/trans.c
trunk/gcc/ada/gcc-interface/utils.c
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog


-- 


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



[Bug tree-optimization/36978] [4.4 Regression] ICE in gimple_cond_set_lhs for -O2 -funswitch-loops after tuples merge

2008-07-30 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2008-07-30 23:59 ---
(gdb) p debug_generic_expr (lhs)
(_Bool) flag_7(D)

In tree_may_unswitch_on, we have:
126   cond = fold_build2 (gimple_cond_code (stmt), boolean_type_node,
127   gimple_cond_lhs (stmt), gimple_cond_rhs (stmt));


But this could produce an extra NOP_EXPR as fold tries to be type strict rather
using the gimple type system.


-- 


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



[Bug ada/36554] [4.4 regression] verify_flow_info ICE can not throw but has EH edges

2008-07-30 Thread ebotcazou at gcc dot gnu dot org


--- Comment #10 from ebotcazou at gcc dot gnu dot org  2008-07-30 23:59 
---
Sort of.


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 CC|ebotcazou at gcc dot gnu dot|
   |org |
 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug middle-end/16660] attribute((aligned)) doesn't work for variables on the stack for greater than required alignement

2008-07-30 Thread hjl dot tools at gmail dot com


--- Comment #14 from hjl dot tools at gmail dot com  2008-07-31 01:04 
---
(In reply to comment #0)
> Running the program below compiled with "-mpreferred-stack-boundary=2"
> gets a "segmentation fault" because the variable "tmp"
> is not properly aligned on a 16-byte boundary (required for
> movaps), violating the aligned(16) request in the attribute.
> 
> void f()
> {
>   unsigned long tmp[4] __attribute__((aligned(16)));
>   asm("movaps %%xmm0, (%0)" : : "r" (tmp) : "memory");
> }
> 
> int main()
> {
>   f();
> }

This should work with gcc 4.4 revision 138335.


-- 


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



[Bug middle-end/16660] attribute((aligned)) doesn't work for variables on the stack for greater than required alignement

2008-07-30 Thread pinskia at gcc dot gnu dot org


--- Comment #15 from pinskia at gcc dot gnu dot org  2008-07-31 01:05 
---
Subject: Re:  attribute((aligned)) doesn't work for variables on the stack for
greater than required alignement

> This should work with gcc 4.4 revision 138335.

Only on x86 and not on any other target ...

-- Pinski


-- 


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



[Bug other/36969] MIPS: gcc-4.3.1 still fails to compile glibc w/ PR/35802 applied

2008-07-30 Thread kumba at gentoo dot org


--- Comment #2 from kumba at gentoo dot org  2008-07-31 01:21 ---
My apologies!  I searched in several areas (google, gcc ML, gcc-bugs, etc..),
and nothing turned up at first, so I thought I'd log a bug.  Bit behind and
playing catch up on a number of things.

I'll test the linked patch and close this if it works.  Thanks!


-- 


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



[Bug tree-optimization/36861] [4.3 Regression] boost's compressed avl confuses GCC

2008-07-30 Thread lothar at tradescape dot biz


--- Comment #20 from lothar at tradescape dot biz  2008-07-31 02:01 ---
With all the supplied test cases and data, why is it so hard to move the bug
out of the UNCONFIRMED state. It should be fairly easy to confirm that it is a
problem by running the attached test.


-- 


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



[Bug bootstrap/36974] [4.4 Regression]: Gcc failed to bootstrap

2008-07-30 Thread hjl dot tools at gmail dot com


--- Comment #5 from hjl dot tools at gmail dot com  2008-07-31 03:42 ---
Fixed.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug target/28074] -mstackrealign generates inefficient code

2008-07-30 Thread hjl dot tools at gmail dot com


--- Comment #6 from hjl dot tools at gmail dot com  2008-07-31 04:05 ---
With revision 138354, we got

bash-3.2$ cat /tmp/x.c
#include 

extern void bar (char *);

char *
e1 (float x, char *p)
{
  volatile __m128 dummy = _mm_set_ps1(x);
  char foo [0];
  bar (foo);
  return p;
}
bash-3.2$ ./xgcc -B./  -O2 -m32 -O -msse2 -S -mstackrealign /tmp/x.c
bash-3.2$ cat x.s
.file   "x.c"
.text
.globl e1
.type   e1, @function
e1:
pushl   %ebp
movl%esp, %ebp
andl$-16, %esp
subl$32, %esp
movss   8(%ebp), %xmm0
shufps  $0, %xmm0, %xmm0
movlps  %xmm0, 16(%esp)
movhps  %xmm0, 24(%esp)
leal16(%esp), %eax
movl%eax, (%esp)
callbar
movl12(%ebp), %eax
leave
ret
.size   e1, .-e1

It is much nicer.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.4.0
Version|4.2.0   |4.4.0


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



[Bug c++/11309] Testsuite failures in g++.dg/expr/anew1.C (and anew2.C anew3.C anew4.c)

2008-07-30 Thread jason at gcc dot gnu dot org


--- Comment #9 from jason at gcc dot gnu dot org  2008-07-31 05:08 ---
Subject: Bug 11309

Author: jason
Date: Thu Jul 31 05:07:10 2008
New Revision: 138355

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138355
Log:
PR c++/11309
* tree.c (build_aggr_init_expr): Split out...
(build_cplus_new): ...from here.
(stabilize_init): Don't mess with AGGR_INIT_EXPR either.
* init.c (build_new_1): new T() means value-initialization,
not default-initialization.
(build_vec_init): Likewise.
(build_value_init_1): Use build_aggr_init_expr.

Added:
trunk/gcc/testsuite/g++.dg/init/value3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/init.c
trunk/gcc/cp/tree.c
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/g++.dg/expr/anew4.C
trunk/gcc/testsuite/g++.dg/lookup/new1.C
trunk/gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C


-- 


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



[Bug c++/35324] [4.2/4.3/4.4 regression] Invalid argument to sizeof not rejected in template

2008-07-30 Thread jason at gcc dot gnu dot org


--- Comment #4 from jason at gcc dot gnu dot org  2008-07-31 05:10 ---
I agree with Jakub.  Closing as INVALID.


-- 

jason at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID


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



[Bug c++/11309] Testsuite failures in g++.dg/expr/anew1.C (and anew2.C anew3.C anew4.c)

2008-07-30 Thread jason at gcc dot gnu dot org


--- Comment #10 from jason at gcc dot gnu dot org  2008-07-31 05:11 ---
Fixed for 4.4.


-- 

jason at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



[Bug rtl-optimization/33721] [meta-bug] Gcc can't properly align stack variable

2008-07-30 Thread hjl dot tools at gmail dot com


--- Comment #4 from hjl dot tools at gmail dot com  2008-07-31 05:16 ---
Fixed by revision 138335.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.4.0
Version|4.3.0   |4.4.0


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



[Bug rtl-optimization/33721] [meta-bug] Gcc can't properly align stack variable

2008-07-30 Thread pinskia at gcc dot gnu dot org


--- Comment #5 from pinskia at gcc dot gnu dot org  2008-07-31 05:21 ---
No, this is not fixed fully.  It is only fixed for x86.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

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


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



[Bug c++/36979] New: 'sizeof' wrong when using typedef ... __attribute__((mode(*I))) in a template

2008-07-30 Thread cyp561 at gmail dot com
This doesn't work: g++-4.3.1
These work: g++-3.4.6 g++-4.1.2 g++-4.2.4

$ g++-4.3.1 -v
Using built-in specs.
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.3.1-r1/work/gcc-4.3.1/configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.3.1
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.1
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.1/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.3.1/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.3.1/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--enable-nls --without-included-gettext --with-system-zlib --disable-checking
--disable-werror --enable-secureplt --enable-multilib --enable-libmudflap
--disable-libssp --enable-cld --enable-java-awt=gtk --enable-objc-gc
--enable-languages=c,c++,java,objc,obj-c++,treelang,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.3.1-r1 p1.1'
Thread model: posix
gcc version 4.3.1 (Gentoo 4.3.1-r1 p1.1)


Same results in 4.3.1 with -O2/-O0 and with/without -m32.
I get the size of unsigned, instead of the size of mode(*I).

---

extern "C" void abort();

template
void function()
{
typedef unsigned uint8_t __attribute__((mode(QI)));
typedef unsigned uint16_t __attribute__((mode(HI)));
typedef unsigned uint32_t __attribute__((mode(SI)));
typedef unsigned uint64_t __attribute__((mode(DI)));
//typedef unsigned uint128_t __attribute__((mode(TI)));
if(sizeof(uint8_t)  != sizeof((uint8_t)0)  ||
   sizeof(uint16_t) != sizeof((uint16_t)0) ||
   sizeof(uint32_t) != sizeof((uint32_t)0) ||
   sizeof(uint64_t) != sizeof((uint64_t)0)
  )
abort();
}

int main()
{
function();
}


-- 
   Summary: 'sizeof' wrong when using typedef ...
__attribute__((mode(*I))) in a template
   Product: gcc
   Version: 4.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: cyp561 at gmail dot com


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



[Bug middle-end/36980] New: Bootstrap broken with RTL checking on i586

2008-07-30 Thread ebotcazou at gcc dot gnu dot org
At revision 138355 the compiler configured with RTL checking fails to bootstrap
on i586-suse-linux with:

/home/eric/build/gcc/native32/./gcc/xgcc -B/home/eric/build/gcc/native32/./gcc/
-B/home/eric/install/gcc/i586-suse-linux/bin/
-B/home/eric/install/gcc/i586-suse-linux/lib/ -isystem
/home/eric/install/gcc/i586-suse-linux/include -isystem
/home/eric/install/gcc/i586-suse-linux/sys-include -g -O2 -O2  -g -O2 -DIN_GCC 
 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual
-Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../.././gcc
-I/home/eric/svn/gcc/libgcc -I/home/eric/svn/gcc/libgcc/.
-I/home/eric/svn/gcc/libgcc/../gcc -I/home/eric/svn/gcc/libgcc/../include
-I/home/eric/svn/gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT
-DHAVE_CC_TLS -DUSE_TLS -o crtfastmath.o -MT crtfastmath.o -MD -MP -MF
crtfastmath.dep -msse -minline-all-stringops -c \
/home/eric/svn/gcc/libgcc/../gcc/config/i386/crtfastmath.c
{ /home/eric/build/gcc/native32/./gcc/nm -pg  _muldi3_s.o _negdi2_s.o
_lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o
_clear_cache_s.o _enable_execute_stack_s.o _trampoline_s.o __main_s.o
_absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o
_mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o
_ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o
_popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o
_paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o
_muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o
_divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o
_fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o
_fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o
_floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o
_udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o addtf3_s.o
divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o
unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o
fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o extendsftf2_s.o
extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o
tf-signs_s.o unwind-dw2_s.o unwind-dw2-fde-glibc_s.o unwind-sjlj_s.o
gthr-gnat_s.o unwind-c_s.o emutls_s.o; echo %%; \
  cat /home/eric/svn/gcc/libgcc/../gcc/libgcc-std.ver
/home/eric/svn/gcc/libgcc/../gcc/config/i386/libgcc-glibc.ver  \
| sed -e '/^[   ]*#/d' \
  -e 's/^%\(if\|else\|elif\|endif\|define\)/#\1/' \
| /home/eric/build/gcc/native32/./gcc/xgcc
-B/home/eric/build/gcc/native32/./gcc/
-B/home/eric/install/gcc/i586-suse-linux/bin/
-B/home/eric/install/gcc/i586-suse-linux/lib/ -isystem
/home/eric/install/gcc/i586-suse-linux/include -isystem
/home/eric/install/gcc/i586-suse-linux/sys-include -g -O2 -O2  -g -O2 -DIN_GCC 
 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual
-Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT
-DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../.././gcc
-I/home/eric/svn/gcc/libgcc -I/home/eric/svn/gcc/libgcc/.
-I/home/eric/svn/gcc/libgcc/../gcc -I/home/eric/svn/gcc/libgcc/../include
-I/home/eric/svn/gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT
-DHAVE_CC_TLS -DUSE_TLS -E -xassembler-with-cpp -; \
} | gawk -f /home/eric/svn/gcc/libgcc/../gcc/mkmap-symver.awk   >
tmp-libgcc.map
/home/eric/svn/gcc/libgcc/../gcc/config/i386/crtfastmath.c: In function
'set_fast_math':
/home/eric/svn/gcc/libgcc/../gcc/config/i386/crtfastmath.c:99: internal
compiler error: RTL check: expected code 'reg', have 'mem' in rhs_regno, at
rtl.h:1005
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[3]: *** [crtfastmath.o] Error 1
make[3]: *** Waiting for unfinished jobs

Starting program: /home/eric/build/gcc/native32/gcc/cc1 crtfastmath.i -O2 -msse
-minline-all-stringops -mtune=i586 -g
warning: Lowest section in system-supplied DSO at 0xe000 is .hash at
e0b4
 __get_cpuid_max __get_cpuid set_fast_math
Analyzing compilation unit
Performing interprocedural optimizations
 
Assembling functions:
 set_fast_math
Breakpoint 2, internal_error (
gmsgid=0x91fd2f4 "RTL check: expected code '%s', have '%s' in %s, at
%s:%d") at /home/eric/svn/gcc/gcc/diagnostic.c:633
633   va_start (ap, gmsgid);
(gdb) bt
#0  internal_error (
gmsgid=0x91fd2f4 "RTL check: expected code '%s', have '%s' in %s, at
%s:%d") at /home/eric/svn/gcc/gcc/diagnostic.c:633
#1  0x0855aeae in rtl_check_failed_code1 (r=0xf7dfbeb8, code=REG,
file=0x91c9ce1 "/home/eric/svn/gcc/gcc/rtl.h", line=1005,
func=0x91c9cd7 "rhs_regno") at /home/eric/svn/gcc/gcc/rtl.c:513
#2  0x08208e28 in rhs_regno (x=0xf7dfbeb8) at /home/eric/svn/gcc/gcc/rtl.h:

[Bug middle-end/36980] [4.4 Regression] Bootstrap broken with RTL checking on i586

2008-07-30 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu dot
   ||org
   Keywords||build, ice-checking, ice-on-
   ||valid-code
Summary|Bootstrap broken with RTL   |[4.4 Regression] Bootstrap
   |checking on i586|broken with RTL checking on
   ||i586
   Target Milestone|--- |4.4.0


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



[Bug middle-end/36980] [4.4 Regression] Bootstrap broken with RTL checking on i586

2008-07-30 Thread ebotcazou at gcc dot gnu dot org


--- Comment #1 from ebotcazou at gcc dot gnu dot org  2008-07-31 06:57 
---
Created an attachment (id=15980)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15980&action=view)
Preprocessed file to be compiled with -msse -g -mtune=i586.


-- 


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