[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-29 Thread t dot artem at mailcity dot com


--- Comment #71 from t dot artem at mailcity dot com  2010-04-29 07:24 
---
(In reply to comment #70)

No, I haven't used -mstackrealign as I presumed that the patch is sufficient -
and since you make me sound like I'm wrong, then the patch is also wrong, since
GCC must be producing a working code with no extra compilation flags.


-- 


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



[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

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


--- Comment #72 from jakub at gcc dot gnu dot org  2010-04-29 07:33 ---
There is no agreement on this being actually a bug, -mpreferred-stack-boundary
is actually an ABI changing option and if you use it you are supposed to deal
with the things it is causing (such as using -mstackrealign when calling code
between the different ABIs).


-- 


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



[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-29 Thread ubizjak at gmail dot com


--- Comment #73 from ubizjak at gmail dot com  2010-04-29 07:50 ---
>From the manual:

`-mstackrealign'
 Realign the stack at entry.  On the Intel x86, the `-mstackrealign'
 option will generate an alternate prologue and epilogue that
 realigns the runtime stack if necessary.  This supports mixing
 legacy codes that keep a 4-byte aligned stack with modern codes
 that keep a 16-byte stack for SSE compatibility.  See also the
 attribute `force_align_arg_pointer', applicable to individual
 functions.


-- 


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



[Bug debug/43478] Missing DW_AT_location for a variable

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


--- Comment #6 from aoliva at gcc dot gnu dot org  2010-04-29 07:52 ---
Created an attachment (id=20513)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20513&action=view)
Patch that implements the idea, but does not improve debug info for this
testcase

Alas, the idea seems to work, but it won't make any difference to the testcase
at hand: we bind the debug temp to rax, just returned from a function and about
to be overwritten before we reach the debug bind insn for y.

The attached patch is WIP, still missing documentation comments and testing.


-- 


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



[Bug lto/41376] collect2 does not handle static libraries

2010-04-29 Thread rguenther at suse dot de


--- Comment #5 from rguenther at suse dot de  2010-04-29 08:29 ---
Subject: Re:  collect2 does not handle static libraries

On Thu, 29 Apr 2010, davek at gcc dot gnu dot org wrote:

> --- Comment #4 from davek at gcc dot gnu dot org  2010-04-29 05:28 ---
> Created an attachment (id=20512)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20512&action=view)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20512&action=view)
> Extends GNU LD to parse archives for LTO.
> 
> (In reply to comment #3)
> >   Ow.  I think we need to get LD to help us out here.
> 
> So this is a rough first draft of the-kind-of-thing-i-was-thinking-of.  We get
> collect2 to run a dummy link early, and extract the output from the
> --lto-assist flag to get a list of archive members that we need lto to
> recompile for us.

If we go that way (extending LD), then it might be worthwhile to go
the full way and have it dump a complete symbol resolution file
like we get from the gold linker plugin.

Note that collect2 was intended to work with any linker (and it does
already query symbols of everything via nm), so I think we have to
emulate static archive linking properly.  Or alternatively move
static archive support completely into lto1 (though that would require
to make symbol resolution follow incremental linking semantics).

Richard.


-- 


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



[Bug rtl-optimization/40838] gcc shouldn't assume that the stack is aligned

2010-04-29 Thread t dot artem at mailcity dot com


--- Comment #74 from t dot artem at mailcity dot com  2010-04-29 08:29 
---
Guys, you are talking in riddles.

There's a fact: with -msse2 -O2 -m32 flags GCC generate bad code for some
properly coded applications, so I wonder what users are supposed to do.

There are already six duplicates of this bug in Wine's bugzilla and several
duplicates in Gentoo bugzilla.


-- 


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



[Bug fortran/43931] New: coarrays: Wrong code (segfault) with allocatable coarrays

2010-04-29 Thread burnus at gcc dot gnu dot org
The following program segfaults at run time. gdb does not show a backtrace and
valgrind just has:

==27936== Jump to the invalid address stated on the next line
==27936==at 0x8: ???
==27936==  Address 0x8 is not stack'd, malloc'd or (recently) free'd

The program is minimal. Removing either the "CALL" or the "ALLOCATE" or "four"
causes non-segfaulting code.

program test
  implicit none
  call one()
contains
  subroutine one()
integer, allocatable :: a(:)[:,:,:]
allocate(a(1)[-4:9,8,4:*])
  end subroutine one
  subroutine four(C)
integer, allocatable :: C(:)[:]
 end subroutine four
end program test


-- 
   Summary: coarrays: Wrong code (segfault) with allocatable
coarrays
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org


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



[Bug c++/43915] Compiler flags error: error: invalid initialization of reference of type 'boost::thread&&' from expression of type 'boost::thread'

2010-04-29 Thread redi at gcc dot gnu dot org


--- Comment #10 from redi at gcc dot gnu dot org  2010-04-29 09:22 ---
I don't think we need to suspend this, it's not possible to return an
rvalue-reference bound to an lvalue, the code is invalid.


-- 

redi at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|SUSPENDED   |RESOLVED
 Resolution||INVALID


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



[Bug target/43884] [4.4/4.5/4.6 Regression] Performance degradation for simple fibonacci numbers calculation

2010-04-29 Thread hubicka at ucw dot cz


--- Comment #17 from hubicka at ucw dot cz  2010-04-29 09:27 ---
Subject: Re:  [4.4/4.5/4.6 Regression] Performance
degradation for simple fibonacci numbers calculation

This is not correct, when profile is guessed we should look into the
frequencies.
I guess profile is wrong after tail recursion elimination or horked by
recursive inlining,
I will take a look.

Honza


-- 


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



[Bug tree-optimization/21046] move memory allocation out of a loop

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


--- Comment #3 from rguenth at gcc dot gnu dot org  2010-04-29 09:33 ---
I am working on this one (well, the first testcase kind).


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

  BugsThisDependsOn||42958
 AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2006-03-05 22:09:11 |2010-04-29 09:33:08
   date||


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



[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L

2010-04-29 Thread redi at gcc dot gnu dot org


--- Comment #68 from redi at gcc dot gnu dot org  2010-04-29 09:49 ---
(In reply to comment #63)
> 
> Based on Solaris 11 x86, I don't see a way for say cstdlib to have only the
> namespace std versions of functions, and not also the global scoped ones. This
> is a problem. The way I read ISO C++, cstdlib should only have std:: scoped
> bits. The C++ compatibility include stdlib.h should then re-scope to ::
> (global). Solaris tries to smash these two concepts together. Boo.

This is no longer a problem:
http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#456

Can we consider defining __cplusplus to the correct value in C++0x mode, even
if we leave it at 1 for 98/03 mode?

Let me know if I can help test on Solaris (if that's still necessary)


-- 


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



[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L

2010-04-29 Thread paolo dot carlini at oracle dot com


--- Comment #69 from paolo dot carlini at oracle dot com  2010-04-29 09:53 
---
For testing, I would suggest also involving Rainer, now he is quite active on
Solaris.


-- 


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



[Bug c++/43911] [4.4/4.5 Regression] g++ can't compile any even trivial c++ source: undefined reference to `_Unwind_GetIPInfo'

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


--- Comment #16 from rguenth at gcc dot gnu dot org  2010-04-29 09:57 
---
(In reply to comment #12)
> $ objdump -T /usr/lib/libgcc_s.so.1 | grep GetIPI
> # i.e. nothing
> $ objdump -T /usr/lib/libgcc_s.so.1 | grep Unwind
> 00010a80 gDF .text  0244  GCC_3.0 _Unwind_Find_FDE
> bd78 gDF .text  0008  GCC_3.0 _Unwind_GetIP
> e84c gDF .text  01f0  GCC_3.3 _Unwind_Resume_or_Rethrow
> bda4 gDF .text  0008  GCC_3.0 _Unwind_GetRegionStart
> ea74 gDF .text  01c8  GCC_3.3 _Unwind_Backtrace
> bccc gDF .text  0008  GCC_3.3 _Unwind_GetCFA
> e654 gDF .text  01f8  GCC_3.0 _Unwind_Resume
> ea3c gDF .text  0038  GCC_3.0 _Unwind_DeleteException
> e1e0 gDF .text  0288  GCC_3.0 _Unwind_RaiseException
> bd94 gDF .text  0008  GCC_3.0 _Unwind_SetIP
> bdec gDF .text  0008  GCC_3.0 _Unwind_GetTextRelBase
> bdac gDF .text  0038  GCC_3.3 _Unwind_FindEnclosingFunction
> bd9c gDF .text  0008  GCC_3.0 _Unwind_GetLanguageSpecificData
> e468 gDF .text  01ec  GCC_3.0 _Unwind_ForcedUnwind
> bcd8 gDF .text  00a0  GCC_3.0 _Unwind_SetGR
> bc44 gDF .text  0088  GCC_3.0 _Unwind_GetGR
> bde4 gDF .text  0008  GCC_3.0 _Unwind_GetDataRelBase
> 
> Hmm... 3.x, but I bootstrapped it with 4.4.2.
> 
> $ objdump -v | head -2
> GNU objdump (GNU Binutils) 2.20.51.20100213
> Copyright 2010 Free Software Foundation, Inc.
> 
> $ objdump -T /home/build-farm/binpkg/working-gcc-4.4.2/usr/lib/libgcc_s.so.1 |
> grep Unwind
> 00010ea8 gDF .text  0260  GCC_3.0 _Unwind_Find_FDE
> bcb4 gDF .text  0014  GCC_4.2.0   _Unwind_GetIPInfo
> bcac gDF .text  0008  GCC_3.0 _Unwind_GetIP
> f144 gDF .text  01dc  GCC_3.3 _Unwind_Resume_or_Rethrow
> bcd8 gDF .text  0008  GCC_3.0 _Unwind_GetRegionStart
> e63c gDF .text  01c8  GCC_3.3 _Unwind_Backtrace
> bc30 gDF .text  0008  GCC_3.3 _Unwind_GetCFA
> ebd0 gDF .text  01e0  GCC_3.0 _Unwind_Resume
> bcf0 gDF .text  0038  GCC_3.0 _Unwind_DeleteException
> eed0 gDF .text  0274  GCC_3.0 _Unwind_RaiseException
> bcc8 gDF .text  0008  GCC_3.0 _Unwind_SetIP
> bce8 gDF .text  0008  GCC_3.0 _Unwind_GetTextRelBase
> bf7c gDF .text  0038  GCC_3.3 _Unwind_FindEnclosingFunction
> bcd0 gDF .text  0008  GCC_3.0 _Unwind_GetLanguageSpecificData
> e918 gDF .text  01e4  GCC_3.0 _Unwind_ForcedUnwind
> bc38 gDF .text  0074  GCC_3.0 _Unwind_SetGR
> bbd4 gDF .text  005c  GCC_3.0 _Unwind_GetGR
> bce0 gDF .text  0008  GCC_3.0 _Unwind_GetDataRelBase
> 
> Hmm...

This means you didn't install libgcc.


-- 


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



[Bug bootstrap/43926] missing crti.o file during build

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


--- Comment #2 from rguenth at gcc dot gnu dot org  2010-04-29 09:57 ---
You need to install the glibc-devel and glibc-devel-32bit packages.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||INVALID


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



[Bug fortran/42958] Weird temporary array allocation

2010-04-29 Thread paul dot richard dot thomas at gmail dot com


--- Comment #22 from paul dot richard dot thomas at gmail dot com  
2010-04-29 10:02 ---
Subject: Re:  Weird temporary array allocation

> As an aside, for the 4.6 array descriptor update, there has been some
> discussion to move from the current (lbound, ubound, stride) triplet for every
> dimension to (lbound, stride, extent). Which would change these kinds of
> expressions.

Yes, indeed.  As soon as I can free up fortran-dev from the vtable
implementation of dynamic dispatch, I will start on this reform.

It is my intention to change the array descriptor representation and
to start with an API that provides the (lbound, ubound,stride) values.
 In fact, this API has already been put in place in the FE but is
incompletely implemented in the library (or, at least, last time I
looked).

Following this first step, the performance bottle necks due to the API
will have to be weeded out.  Having the extent to hand will greatly
simplify issues such as this PR.

Then the plethora of new descriptor fields will have to be added and
the various associated PRs dealt with.

At this point, the upgrade should be ready for applying to trunk.

Paul


-- 


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



[Bug libstdc++/1773] __cplusplus defined to 1, should be 199711L

2010-04-29 Thread marc dot glisse at normalesup dot org


--- Comment #70 from marc dot glisse at normalesup dot org  2010-04-29 
10:27 ---
(In reply to comment #68)
> (In reply to comment #63)
> > 
> > Based on Solaris 11 x86, I don't see a way for say cstdlib to have only the
> > namespace std versions of functions, and not also the global scoped ones. 
> > This
> > is a problem. The way I read ISO C++, cstdlib should only have std:: scoped
> > bits. The C++ compatibility include stdlib.h should then re-scope to ::
> > (global). Solaris tries to smash these two concepts together. Boo.
> 
> This is no longer a problem:
> http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#456

It was not so hard to work around in any case (see rest of the discussion).

> Can we consider defining __cplusplus to the correct value in C++0x mode, even
> if we leave it at 1 for 98/03 mode?

The reason for not defining it to the correct value is not that it would yield
an unclean situation (which is already the case). There are several issues:

- breaks the ABI because tm and a couple other structs move from the global
namespace to namespace std. This can be worked around by forcing the mangling
of std::tm to be that of ::tm, but it is ugly.

- needs to remove the overloads on linkage (like bsearch, qsort) in the solaris
headers because g++ is broken there.

- needs to adapt redefine_extname to remove its limitation to the global
namespace.

- needs to conditionally remove the overloads from libstdc++ that are already
in the solaris headers (like the math functions) and deal with the fact that
afterwards, including math.h instead of cmath will mean that cos(int) fails, at
least until Oracle writes C++0X headers (might take a few years). Or fixinclude
out almost anything that __cplusplus enables...

I had a proof of concept in some PR some time ago, but the fixinclude part was
a bit heavy...


-- 


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



[Bug target/43729] Mach-O LTO support needed for darwin

2010-04-29 Thread steven at gcc dot gnu dot org


--- Comment #16 from steven at gcc dot gnu dot org  2010-04-29 10:48 ---
Re. comment #14 this is now Apple radar 7920267. Let's see if someone on their
end can cq. is willing to help us out here.


-- 


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



[Bug bootstrap/43858] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: cannot compute suffix of object files

2010-04-29 Thread bernds at gcc dot gnu dot org


--- Comment #27 from bernds at gcc dot gnu dot org  2010-04-29 11:04 ---
Subject: Bug 43858

Author: bernds
Date: Thu Apr 29 11:04:30 2010
New Revision: 158898

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158898
Log:
From Dominique d'Humieres 
PR bootstrap/43858
* ifcvt.c (dead_or_predicable): Use df_simulate_find_defs to compute
test_set.

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


-- 


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



[Bug target/43729] Mach-O LTO support needed for darwin

2010-04-29 Thread steven at gcc dot gnu dot org


--- Comment #17 from steven at gcc dot gnu dot org  2010-04-29 11:39 ---
I've played a bit with modified .s files by hand, and as/ld work if the LTO
sections follow the other sections.

The normal order of output with -flto looks like this in the .s file:

LTO sections (the __GNU_LTO stuff)
.text / .data / etc. (all non-LTO sections)
LTO __section_names section

With this order I get the linker error.

I do *not* get the linker error if I re-order the .s file by hand to look like
this:

.text / .data / etc. (all non-LTO sections)
LTO sections (the __GNU_LTO stuff)
LTO __section_names section

With this order, the .s file looks identical with and without -flto, except for
the extra LTO sections after the non-LTO stuff of course. And with this order,
the linker doesn't give an error.

I don't understand this at all. It is almost as if the compiler somehow writes
an address relative to start-of-file, but the compiler doesn't know about
addresses (it can write labels and such, but not count bytes from
start-of-file).

Anyway, I did some research with Google and we are not the first to encounter
this problem. Apparently it doesn't happen in 32-bits mode, so I'll implement
that now and try that.

The important conclusion for me, is that the LTO patch is OK and the bug is
somewhere else :-)


-- 


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



[Bug c++/43932] New: conditional operator can't convert 0 to pointer

2010-04-29 Thread joerg dot richter at pdv-fs dot de
$ cat t.cc
void* func( bool b )
{
  return b ? 0 : throw 5;
}

$ g++ -c t.cc
template.cc: In function 'void* func(bool)':
template.cc:3:24: error: invalid conversion from 'int' to 'void*'

Replace 'throw 5' with '0' and it compiles as expected.


-- 
   Summary: conditional operator can't convert 0 to pointer
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: joerg dot richter at pdv-fs dot de


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



[Bug libfortran/43844] open(unit, status="scratch") fails to create tempporary file

2010-04-29 Thread nightstrike at gmail dot com


--- Comment #14 from nightstrike at gmail dot com  2010-04-29 11:53 ---
I'm running the testsuite now


-- 


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



[Bug c++/43933] New: Suboptimal error message when supplying a bad default value in initialization

2010-04-29 Thread bero at arklinux dot org
When doing something like this:

class A {
A();
QString a;
};

A::A():a(0) {
}

The error message is


test.cpp: In constructor ‘ScribusDoc::ScribusDoc()’:
test.cpp:6:12: error: call of overloaded ‘QString(int)’ is ambiguous
/usr/lib64/qt4/include/QtCore/qstring.h:427:43: note: candidates are:
QString::QString(const QByteArray&)
/usr/lib64/qt4/include/QtCore/qstring.h:425:43: note:
QString::QString(const char*)
/usr/lib64/qt4/include/QtCore/qstring.h:726:8: note:
QString::QString(const QString&)
/usr/lib64/qt4/include/QtCore/qstring.h:106:5: note:
QString::QString(QChar)
/usr/lib64/qt4/include/QtCore/qstring.h:105:14: note:
QString::QString(const QChar*)


It would be useful if there was an indication of which initializer is being
processed at the time, e.g.

test.cpp: In constructor ‘ScribusDoc::ScribusDoc()’:
test.cpp:6:12: error: call of overloaded ‘QString(int)’ is ambiguous while
initializing member ‘a'
/usr/lib64/qt4/include/QtCore/qstring.h:427:43: note: candidates are:
QString::QString(const QByteArray&)
/usr/lib64/qt4/include/QtCore/qstring.h:425:43: note:
QString::QString(const char*)
/usr/lib64/qt4/include/QtCore/qstring.h:726:8: note:
QString::QString(const QString&)
/usr/lib64/qt4/include/QtCore/qstring.h:106:5: note:
QString::QString(QChar)
/usr/lib64/qt4/include/QtCore/qstring.h:105:14: note:
QString::QString(const QChar*)

especially if the class initializes tens of variables rather than just one.


-- 
   Summary: Suboptimal error message when supplying a bad default
value in initialization
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bero at arklinux dot org


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



[Bug c++/43932] conditional operator can't convert 0 to pointer

2010-04-29 Thread schwab at linux-m68k dot org


--- Comment #1 from schwab at linux-m68k dot org  2010-04-29 12:09 ---
A throw-expression cannot be part of a integral constant expression, thus it
cannot be a null pointer constant.


-- 

schwab at linux-m68k dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug tree-optimization/43934] New: LIM should handle PHI nodes

2010-04-29 Thread rguenth at gcc dot gnu dot org
Currently LIM does not handle moving invariant PHIs.

void bar (int);
void foo (int n, int m)
{
  unsigned i;
  for (i = 0; i < n; ++i)
{
  int x;
  if (m < 0)
x = 1;
  else
x = m;
  bar (x);
}
}

we should move the computation of x out of the loop.

For simple cases like this, a single invariant PHI node controlled by
the predicate

  if (m_6(D) < 0)
goto ;
  else
goto ;

:
  goto ;

:

:
  # x_2 = PHI <1(4), m_6(D)(9)>

we can hoist x_2 by inserting an assignment from a COND_EXPR.  Multiple
PHI nodes and/or not trivially empty intermediate blocks should be moved
as CFG pieces instead.

Thus hacking the simple case into LIM is the same as converting such
CFG pieces to COND_EXPRs similar to what if-conversion for the vectorizer
does.


-- 
   Summary: LIM should handle PHI nodes
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org


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



[Bug other/43620] [4.3/4.4 Regression] Uploading to gnu.org will fail due to automake security issue

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


--- Comment #7 from jakub at gcc dot gnu dot org  2010-04-29 12:28 ---
Unfortunately this hasn't been fixed on the branches and just prevented
gcc-4.4.4 from being uploaded to ftp.gnu.org (but it has been already uploaded
to gcc.gnu.org, is tagged etc.).

As the bug wasn't marked as a regression (it is not a regression, sure), it
didn't show up on the Serious regressions queries to be on the radar for RM
decisions.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

Summary|Uploading to gnu.org will   |[4.3/4.4 Regression]
   |fail due to automake|Uploading to gnu.org will
   |security issue  |fail due to automake
   ||security issue
   Target Milestone|--- |4.3.5


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



[Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization

2010-04-29 Thread redi at gcc dot gnu dot org


--- Comment #1 from redi at gcc dot gnu dot org  2010-04-29 12:38 ---

test.cpp:6:12: error: call of overloaded ‘QString(int)’ is ambiguous
  

the column number should refer to the relevant mem-initializer


-- 

redi at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-04-29 12:38:02
   date||


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



[Bug c++/43933] Suboptimal error message when supplying a bad default value in initialization

2010-04-29 Thread redi at gcc dot gnu dot org


--- Comment #2 from redi at gcc dot gnu dot org  2010-04-29 12:39 ---
self-contained testcase

struct QString {
  QString(const char*);
  QString(const QString&);
  QString(char);
};

class A {
A();
QString a;
QString b;
};

A::A() : a(0), b(0) { }


-- 


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



[Bug bootstrap/43935] New: [4.6 Regression] Bootstrap failure: cc1: all warnings being treated as errors

2010-04-29 Thread dominiq at lps dot ens dot fr
When bootstrapped with -Werror (should not everyone bootstrap with it ?),
bootstrapping gcc fails with:

...
In file included from /Users/regress/tbox/svn-gcc/gcc/attribs.c:37:0:
/Users/regress/tbox/svn-gcc/gcc/plugin.h: In function
'invoke_plugin_callbacks':
/Users/regress/tbox/svn-gcc/gcc/plugin.h:47:30: error: unused parameter 'event'
[-Werror=unused-parameter]
/Users/regress/tbox/svn-gcc/gcc/plugin.h:47:43: error: unused parameter
'gcc_data' [-Werror=unused-parameter]
cc1: all warnings being treated as errors

(see http://gcc.gnu.org/ml/gcc-regression/2010-04/txt00157.txt). The "Gcc
[trunk revision 158897] failed to boostrap on x86_64!" is likely due to the
same problem due to revision 158896.


-- 
   Summary: [4.6 Regression] Bootstrap failure: cc1: all warnings
being treated as errors
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dominiq at lps dot ens dot fr


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



[Bug target/43921] Bootstrap comparison fails when using -march=atom

2010-04-29 Thread hjl at gcc dot gnu dot org


--- Comment #2 from hjl at gcc dot gnu dot org  2010-04-29 12:51 ---
Subject: Bug 43921

Author: hjl
Date: Thu Apr 29 12:51:09 2010
New Revision: 158900

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158900
Log:
Replace INSN_P with NONDEBUG_INSN_P.

2010-04-29  H.J. Lu  

PR target/43921
* config/i386/i386.c (get_some_local_dynamic_name): Replace
INSN_P with NONDEBUG_INSN_P.
(distance_non_agu_define): Likewise.
(distance_agu_use): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c


-- 


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



[Bug c++/43932] conditional operator can't convert 0 to pointer

2010-04-29 Thread joerg dot richter at pdv-fs dot de


--- Comment #2 from joerg dot richter at pdv-fs dot de  2010-04-29 12:54 
---
But throw can be part of ?: operator:

$ cat t.cc
int func( bool b )
{
  return b ? 0 : throw 5;
}

$ g++ -c t.cc




-- 

joerg dot richter at pdv-fs dot de changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |


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



[Bug bootstrap/43936] New: [4.6 regression] Revision 158896 failed to bootstrap

2010-04-29 Thread hjl dot tools at gmail dot com
On Linux/x86-64, revision 158897 gave:

make[6]: Leaving directory `/export/gnu/import/svn/gcc-test/bld'
Comparing stages 2 and 3 
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/ggc-common.o differs
gcc/tree-optimize.o differs
gcc/ggc-page.o differs
gcc/c-pragma.o differs
gcc/c-decl.o differs
gcc/cgraphunit.o differs
make[5]: *** [compare] Error 1
make[5]: Leaving directory `/export/gnu/import/svn/gcc-test/bld'
make[4]: *** [stage3-bubble] Error 2
make[4]: Leaving directory `/export/gnu/import/svn/gcc-test/bld'
make[3]: *** [bootstrap] Error 2

Revision 158895 is OK. Revision 158896:

http://gcc.gnu.org/ml/gcc-cvs/2010-04/msg01003.html

is the cause.


-- 
   Summary: [4.6 regression] Revision 158896 failed to bootstrap
   Product: gcc
   Version: 4.6.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


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

2010-04-29 Thread ebotcazou at gcc dot gnu dot org


--- Comment #1 from ebotcazou at gcc dot gnu dot org  2010-04-29 13:00 
---
Same error here.


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-04-29 13:00:45
   date||
Summary|[4.6 regression] Revision   |[4.6 regression] Revision
   |158896 failed to bootstrap  |158896 fails to bootstrap


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #2 from dominiq at lps dot ens dot fr  2010-04-29 13:07 ---
See also pr 43935 (even if it is not a duplicate).


-- 


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



[Bug bootstrap/43935] [4.6 Regression] Bootstrap failure: cc1: all warnings being treated as errors

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


--- Comment #1 from dominiq at lps dot ens dot fr  2010-04-29 13:09 ---
> The "Gcc [trunk revision 158897] failed to boostrap on x86_64!" is likely due 
> to the
> same problem due to revision 158896.

Not the same problem, but the same revision: see pr43936.


-- 


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



[Bug bootstrap/43935] [4.6 Regression] Bootstrap failure: cc1: all warnings being treated as errors

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


--- Comment #2 from hjl dot tools at gmail dot com  2010-04-29 13:10 ---
(In reply to comment #0)
> When bootstrapped with -Werror (should not everyone bootstrap with it ?),

-Werror won't fail if

#define ENABLE_PLUGIN 1


-- 


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



[Bug debug/43937] New: [4.6 regression] FAIL: gcc.dg/guality/inline-params.c

2010-04-29 Thread hjl dot tools at gmail dot com
On Linux/x86, revision 158843 gave:

FAIL: gcc.dg/guality/inline-params.c  -O1  execution test

Revision 158835 is OK


-- 
   Summary: [4.6 regression] FAIL: gcc.dg/guality/inline-params.c
   Product: gcc
   Version: 4.6.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


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



[Bug fortran/42958] Weird temporary array allocation

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


--- Comment #23 from jakub at gcc dot gnu dot org  2010-04-29 13:18 ---
Created an attachment (id=20514)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20514&action=view)
d3.c

BTW, I've timed different variants of the C code for the tonto loop, and
time /tmp/d3 1

real0m0.667s
user0m0.666s
sys 0m0.001s

time /tmp/d3 2

real0m0.640s
user0m0.639s
sys 0m0.000s

time /tmp/d3 3

real0m0.616s
user0m0.614s
sys 0m0.002s

and clearly the last one (versioning the loop if the temporary can be easily
avoided for -O3 at least) is the winner here.  I've started looking into that
yesterday.


-- 


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



[Bug debug/43937] [4.6 regression] FAIL: gcc.dg/guality/inline-params.c

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


--- Comment #1 from hjl dot tools at gmail dot com  2010-04-29 13:20 ---
Revision 158838:

http://gcc.gnu.org/ml/gcc-cvs/2010-04/msg00945.html

may be the cause.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu dot
   ||org


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



[Bug target/43729] Mach-O LTO support needed for darwin

2010-04-29 Thread howarth at nitro dot med dot uc dot edu


--- Comment #18 from howarth at nitro dot med dot uc dot edu  2010-04-29 
13:20 ---
Does the executable created from the manually reordered aermod.s run correctly?


-- 


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



[Bug middle-end/43938] New: [4.6 regression] gcc.dg/lto/const-uniq c_lto_const-uniq_0.o-c_lto_const-uniq_1.o link

2010-04-29 Thread hjl dot tools at gmail dot com
On Linux/x86, revision 158895 gave

FAIL: gcc.dg/lto/const-uniq c_lto_const-uniq_0.o-c_lto_const-uniq_1.o link

Revision 158852 is OK.


-- 
   Summary: [4.6 regression] gcc.dg/lto/const-uniq c_lto_const-
uniq_0.o-c_lto_const-uniq_1.o link
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl dot tools at gmail dot com


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



[Bug middle-end/43938] [4.6 regression] gcc.dg/lto/const-uniq c_lto_const-uniq_0.o-c_lto_const-uniq_1.o link

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


--- Comment #1 from hjl dot tools at gmail dot com  2010-04-29 13:24 ---
Revision 158854:

http://gcc.gnu.org/ml/gcc-cvs/2010-04/msg00961.html

is the cause.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu dot
   ||org


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

2010-04-29 Thread dje at gcc dot gnu dot org


--- Comment #3 from dje at gcc dot gnu dot org  2010-04-29 13:25 ---
rs6000 also is experiencing stage 2/3 comparison failures on both Linux and
AIX.


-- 

dje at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||dje at gcc dot gnu dot org
   Priority|P3  |P1


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

2010-04-29 Thread dje at gcc dot gnu dot org


--- Comment #4 from dje at gcc dot gnu dot org  2010-04-29 13:29 ---
On rs6000, the miscompare seems to start at revision 158633 and a SEGV
configuring libgcc at rev 158639.


-- 


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



[Bug c++/43932] conditional operator can't convert 0 to pointer

2010-04-29 Thread redi at gcc dot gnu dot org


--- Comment #3 from redi at gcc dot gnu dot org  2010-04-29 13:31 ---
See [expr.cond]p2
if one operand is a throw-expression the result of the conditional-expression
is an rvalue of the type of the other operand (i.e. int)

I think it's actually a bug that this compiles:
int* f(bool b) { return b ? 0 : 0; }

Again, the result of the conditional expression is an rvalue of type int, it is
not a null pointer constant


-- 


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



[Bug c++/43932] conditional operator can't convert 0 to pointer

2010-04-29 Thread redi at gcc dot gnu dot org


--- Comment #4 from redi at gcc dot gnu dot org  2010-04-29 13:34 ---
That example 'f' is equivalent to this, which also compiles:

int* g(bool b) { return int(b ? 0 : 0); }

that's /definitely/ wrong


-- 


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



[Bug middle-end/43938] [4.6 regression] gcc.dg/lto/const-uniq c_lto_const-uniq_0.o-c_lto_const-uniq_1.o link

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


-- 

hubicka at gcc dot gnu dot org changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |hubicka at gcc dot gnu dot
   |dot org |org
 Status|UNCONFIRMED |ASSIGNED
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2010-04-29 13:39:22
   date||


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



[Bug fortran/43931] coarrays: Wrong code (segfault) with allocatable coarrays

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


--- Comment #1 from burnus at gcc dot gnu dot org  2010-04-29 13:49 ---
Created an attachment (id=20515)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20515&action=view)
142t.optimized dump


-- 


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



[Bug fortran/43931] coarrays: Wrong code (segfault) with allocatable coarrays

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


--- Comment #2 from burnus at gcc dot gnu dot org  2010-04-29 13:49 ---
Created an attachment (id=20516)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20516&action=view)
Assembler (x86-64-linux)


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #5 from dominiq at lps dot ens dot fr  2010-04-29 13:50 ---
> ... and a SEGV configuring libgcc at rev 158639.

This is probably pr43858 and it should be fixed by revision 158898.


-- 


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



[Bug bootstrap/43935] [4.6 Regression] Bootstrap failure: cc1: all warnings being treated as errors

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


--- Comment #3 from rguenth at gcc dot gnu dot org  2010-04-29 14:10 ---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.6.0


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



[Bug bootstrap/43935] [4.6 Regression] Bootstrap failure: cc1: all warnings being treated as errors

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


--- Comment #4 from rguenth at gcc dot gnu dot org  2010-04-29 14:11 ---
Subject: Bug 43935

Author: rguenth
Date: Thu Apr 29 14:10:39 2010
New Revision: 158901

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158901
Log:
2010-04-29  Richard Guenther  

PR bootstrap/43935
* plugin.h (invoke_plugin_callbacks): Annotate arguments
with ATTRIBUTE_UNUSED.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/plugin.h


-- 


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



[Bug c++/43932] conditional operator can't convert 0 to pointer

2010-04-29 Thread redi at gcc dot gnu dot org


--- Comment #5 from redi at gcc dot gnu dot org  2010-04-29 14:11 ---
the definition of integral constant expression has changed between C++03 and
C++0x, so that int() is a valid integral constant expression, as is int(b?0:0)

So that makes my 'f' and 'g' examples valid.

However, by [expr.const] a conditional-expression is not a constant expression
if it contains a throw-expression, so Andreas was 100% correct in comment 2 and
the original report is invalid. It should be

   return b ? (void*)0 : throw 5


-- 

redi at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


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



[Bug middle-end/43938] [4.6 regression] gcc.dg/lto/const-uniq c_lto_const-uniq_0.o-c_lto_const-uniq_1.o link

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


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


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



[Bug debug/43937] [4.6 regression] FAIL: gcc.dg/guality/inline-params.c

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


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


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



[Bug tree-optimization/43934] LIM should handle PHI nodes

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


--- Comment #1 from rguenth at gcc dot gnu dot org  2010-04-29 14:16 ---
I have a patch.


-- 

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 |2010-04-29 14:16:00
   date||


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



[Bug c++/43932] conditional operator can't convert 0 to pointer

2010-04-29 Thread redi at gcc dot gnu dot org


--- Comment #6 from redi at gcc dot gnu dot org  2010-04-29 14:17 ---
for further confirmation, the original case is covered by:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#367

and my cases are covered by:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#236


-- 


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



[Bug fortran/43931] coarrays: Wrong code (segfault) with allocatable coarrays

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


--- Comment #3 from burnus at gcc dot gnu dot org  2010-04-29 14:34 ---
The issue is that
  a.dim[]
is too small, which was traced by Alexander Monakov (thanks!).

This is in turn due to:
  gfc_get_array_descriptor_base (int dimen, int codimen, bool restricted)
  {
int idx = 2 * (dimen - 1) + restricted;
[...]
gfc_array_descriptor_base[idx] = fat_type;

Possible patch (untested) below.

However, as coarrays do not need to agree on the coranks (except for
allocatable ones), coarrays with different corank are compatible. Ditto for
passing a coarray to a non-coarray. Thus, the patch below will cause problems
for
  integer :: coarray(1)[2,*]
  call foo(coarray)
to
  subroutine foo(coarray)
  integer :: coarray(1)[*]
or to
  subroutine foo(array)
  integer :: array(1)
as the coranks don't agree and thus not the type. I have to think about how to
solve this best. For allocatable coarrays there is no problem, as there the
coranks have to agree.


Index: trans-types.c
===
--- trans-types.c   (revision 158895)
+++ trans-types.c   (working copy)
@@ -1542,7 +1542,7 @@
 {
   tree fat_type, fieldlist, decl, arraytype;
   char name[16 + 2*GFC_RANK_DIGITS + 1 + 1];
-  int idx = 2 * (dimen - 1) + restricted;
+  int idx = 2 * (codimen + dimen - 1) + restricted;

   gcc_assert (dimen >= 1 && codimen + dimen <= GFC_MAX_DIMENSIONS);
   if (gfc_array_descriptor_base[idx])
@@ -1551,8 +1551,7 @@
   /* Build the type node.  */
   fat_type = make_node (RECORD_TYPE);

-  sprintf (name, "array_descriptor" GFC_RANK_PRINTF_FORMAT "_"
-  GFC_RANK_PRINTF_FORMAT, dimen, codimen);
+  sprintf (name, "array_descriptor" GFC_RANK_PRINTF_FORMAT, dimen + codimen);
   TYPE_NAME (fat_type) = get_identifier (name);

   /* Add the data member as the first element of the descriptor.  */
@@ -1629,8 +1628,7 @@
 type_name = IDENTIFIER_POINTER (tmp);
   else
 type_name = "unknown";
-  sprintf (name, "array" GFC_RANK_PRINTF_FORMAT "_"
-  GFC_RANK_PRINTF_FORMAT "_%.*s", dimen, codimen,
+  sprintf (name, "array" GFC_RANK_PRINTF_FORMAT "_%.*s", dimen + codimen,
   GFC_MAX_SYMBOL_LEN, type_name);
   TYPE_NAME (fat_type) = get_identifier (name);


-- 


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



[Bug rtl-optimization/33928] [4.3/4.4/4.5/4.6 Regression] 30% performance slowdown in floating-point code caused by r118475

2010-04-29 Thread bergner at gcc dot gnu dot org


--- Comment #113 from bergner at gcc dot gnu dot org  2010-04-29 14:34 
---
Subject: Bug 33928

Author: bergner
Date: Thu Apr 29 14:34:35 2010
New Revision: 158902

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158902
Log:
Backport from mainline.

2009-08-30  Alan Modra  

PR target/41081
* fwprop.c (get_reg_use_in): Delete.
(free_load_extend): New function.
(forward_propagate_subreg): Use it.

2009-08-23  Alan Modra  

PR target/41081
* fwprop.c (try_fwprop_subst): Allow multiple sets.
(get_reg_use_in): New function.
(forward_propagate_subreg): Propagate through subreg of zero_extend
or sign_extend.

2009-05-08  Paolo Bonzini  

PR rtl-optimization/33928
PR 26854
* fwprop.c (use_def_ref, get_def_for_use, bitmap_only_bit_bitween,
process_uses, build_single_def_use_links): New.
(update_df): Update use_def_ref.
(forward_propagate_into): Use get_def_for_use instead of use-def
chains.
(fwprop_init): Call build_single_def_use_links and let it initialize
dataflow.
(fwprop_done): Free use_def_ref.
(fwprop_addr): Eliminate duplicate call to df_set_flags.
* df-problems.c (df_rd_simulate_artificial_defs_at_top,
df_rd_simulate_one_insn): New.
(df_rd_bb_local_compute_process_def): Update head comment.
(df_chain_create_bb): Use the new RD simulation functions.
* df.h (df_rd_simulate_artificial_defs_at_top,
df_rd_simulate_one_insn): New.
* opts.c (decode_options): Enable fwprop at -O1.
* doc/invoke.texi (-fforward-propagate): Document this.

Modified:
branches/ibm/gcc-4_4-branch/gcc/ChangeLog.ibm
branches/ibm/gcc-4_4-branch/gcc/df-problems.c
branches/ibm/gcc-4_4-branch/gcc/df.h
branches/ibm/gcc-4_4-branch/gcc/doc/invoke.texi
branches/ibm/gcc-4_4-branch/gcc/fwprop.c
branches/ibm/gcc-4_4-branch/gcc/opts.c


-- 


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



[Bug tree-optimization/26854] [4.3/4.4/4.5/4.6 Regression] Inordinate compile times on large routines

2010-04-29 Thread bergner at gcc dot gnu dot org


--- Comment #119 from bergner at gcc dot gnu dot org  2010-04-29 14:34 
---
Subject: Bug 26854

Author: bergner
Date: Thu Apr 29 14:34:35 2010
New Revision: 158902

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158902
Log:
Backport from mainline.

2009-08-30  Alan Modra  

PR target/41081
* fwprop.c (get_reg_use_in): Delete.
(free_load_extend): New function.
(forward_propagate_subreg): Use it.

2009-08-23  Alan Modra  

PR target/41081
* fwprop.c (try_fwprop_subst): Allow multiple sets.
(get_reg_use_in): New function.
(forward_propagate_subreg): Propagate through subreg of zero_extend
or sign_extend.

2009-05-08  Paolo Bonzini  

PR rtl-optimization/33928
PR 26854
* fwprop.c (use_def_ref, get_def_for_use, bitmap_only_bit_bitween,
process_uses, build_single_def_use_links): New.
(update_df): Update use_def_ref.
(forward_propagate_into): Use get_def_for_use instead of use-def
chains.
(fwprop_init): Call build_single_def_use_links and let it initialize
dataflow.
(fwprop_done): Free use_def_ref.
(fwprop_addr): Eliminate duplicate call to df_set_flags.
* df-problems.c (df_rd_simulate_artificial_defs_at_top,
df_rd_simulate_one_insn): New.
(df_rd_bb_local_compute_process_def): Update head comment.
(df_chain_create_bb): Use the new RD simulation functions.
* df.h (df_rd_simulate_artificial_defs_at_top,
df_rd_simulate_one_insn): New.
* opts.c (decode_options): Enable fwprop at -O1.
* doc/invoke.texi (-fforward-propagate): Document this.

Modified:
branches/ibm/gcc-4_4-branch/gcc/ChangeLog.ibm
branches/ibm/gcc-4_4-branch/gcc/df-problems.c
branches/ibm/gcc-4_4-branch/gcc/df.h
branches/ibm/gcc-4_4-branch/gcc/doc/invoke.texi
branches/ibm/gcc-4_4-branch/gcc/fwprop.c
branches/ibm/gcc-4_4-branch/gcc/opts.c


-- 


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



[Bug target/41081] redundant ZERO_EXTENDs

2010-04-29 Thread bergner at gcc dot gnu dot org


--- Comment #15 from bergner at gcc dot gnu dot org  2010-04-29 14:34 
---
Subject: Bug 41081

Author: bergner
Date: Thu Apr 29 14:34:35 2010
New Revision: 158902

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158902
Log:
Backport from mainline.

2009-08-30  Alan Modra  

PR target/41081
* fwprop.c (get_reg_use_in): Delete.
(free_load_extend): New function.
(forward_propagate_subreg): Use it.

2009-08-23  Alan Modra  

PR target/41081
* fwprop.c (try_fwprop_subst): Allow multiple sets.
(get_reg_use_in): New function.
(forward_propagate_subreg): Propagate through subreg of zero_extend
or sign_extend.

2009-05-08  Paolo Bonzini  

PR rtl-optimization/33928
PR 26854
* fwprop.c (use_def_ref, get_def_for_use, bitmap_only_bit_bitween,
process_uses, build_single_def_use_links): New.
(update_df): Update use_def_ref.
(forward_propagate_into): Use get_def_for_use instead of use-def
chains.
(fwprop_init): Call build_single_def_use_links and let it initialize
dataflow.
(fwprop_done): Free use_def_ref.
(fwprop_addr): Eliminate duplicate call to df_set_flags.
* df-problems.c (df_rd_simulate_artificial_defs_at_top,
df_rd_simulate_one_insn): New.
(df_rd_bb_local_compute_process_def): Update head comment.
(df_chain_create_bb): Use the new RD simulation functions.
* df.h (df_rd_simulate_artificial_defs_at_top,
df_rd_simulate_one_insn): New.
* opts.c (decode_options): Enable fwprop at -O1.
* doc/invoke.texi (-fforward-propagate): Document this.

Modified:
branches/ibm/gcc-4_4-branch/gcc/ChangeLog.ibm
branches/ibm/gcc-4_4-branch/gcc/df-problems.c
branches/ibm/gcc-4_4-branch/gcc/df.h
branches/ibm/gcc-4_4-branch/gcc/doc/invoke.texi
branches/ibm/gcc-4_4-branch/gcc/fwprop.c
branches/ibm/gcc-4_4-branch/gcc/opts.c


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #6 from dominiq at lps dot ens dot fr  2010-04-29 14:39 ---
> On rs6000, the miscompare seems to start at revision 158633 ...

I think what you see at revision 158633 is a bootstrap failure due to a missing
prototype in optabs.h, fixed with revision 158643. Meanwhile revision 158639
introduced another failure probably on all ppc platforms  (pr43858 reported
against powerpc-apple-darwin9) and fixed with revision 158898. Meanwhile
revision 158896 introduced a new bootstrap failure fixed at revision 158901 for
pr43935, but not yet for pr43936!-(regress fails to bootstrap since April 22
10:14:   NEW GCC build failure, h...@158635 on native).


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #7 from hjl dot tools at gmail dot com  2010-04-29 14:47 ---
For some reason, c-decl.o in stage2 has no debug sections:

There are 16 section headers, starting at offset 0x1fbf8:

Section Headers:
  [Nr] Name  Type Address   Offset
   Size  EntSize  Flags  Link  Info  Align
  [ 0]   NULL   
        0 0 0
  [ 1] .text PROGBITS   0040
   00018e74    AX   0 0 16
  [ 2] .rela.textRELA   00025700
   0001e900  0018  14 1 8
  [ 3] .data PROGBITS   00018eb4
   0001    WA   0 0 4
  [ 4] .bss  NOBITS     00018ec0
   011b    WA   0 0 32
  [ 5] .rodata.str1.1PROGBITS   00018ec0
   059e  0001 AMS   0 0 1
  [ 6] .rodata.str1.8PROGBITS   00019460
   3edd  0001 AMS   0 0 8
  [ 7] .rodata   PROGBITS   0001d340
   126c     A   0 0 32
  [ 8] .rela.rodata  RELA   00044000
   1c20  0018  14 7 8
  [ 9] .comment  PROGBITS   0001e5ac
   002a  0001  MS   0 0 1
  [10] .note.GNU-stack   PROGBITS   0001e5d6
        0 0 1
  [11] .eh_frame PROGBITS   0001e5d8
   1598     A   0 0 8
  [12] .rela.eh_frameRELA   00045c20
   0c00  0018  1411 8
  [13] .shstrtab STRTAB     0001fb70
   0084     0 0 1
  [14] .symtab   SYMTAB     0001fff8
   3120  0018  15   130 8
  [15] .strtab   STRTAB     00023118
   25e7     0 0 1


-- 


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



[Bug tree-optimization/43940] New: DOM doesn't propagate constants properly

2010-04-29 Thread rguenth at gcc dot gnu dot org
For

int main()
{
  void *p = __builtin_malloc (4);
  if (p)
{
  __builtin_free (p);
  p = 0;
}
  __builtin_free (p);
  return 0;
}

DOM does not propagate p == 0 on the else path leaving

:
  p_2 = __builtin_malloc (4);
  if (p_2 != 0B)
goto ;
  else
goto ;

:
  __builtin_free (p_2);

:
  # p_1 = PHI 
  __builtin_free (p_1);


VRP can do this.


-- 
   Summary: DOM doesn't propagate constants properly
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org


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



[Bug other/43620] [4.3/4.4 Regression] Uploading to gnu.org will fail due to automake security issue

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


--- Comment #8 from jakub at gcc dot gnu dot org  2010-04-29 15:03 ---
Subject: Bug 43620

Author: jakub
Date: Thu Apr 29 15:03:38 2010
New Revision: 158903

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158903
Log:
PR other/43620
libgomp/
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist option.
* Makefile.in: Regenerated.
libstdc++-v3/
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist option.
* Makefile.in: Regenerated.
libgfortran/
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist option.
* Makefile.in: Regenerated.
libmudflap/
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist option.
* Makefile.in: Regenerated.
libffi/
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist option.
* Makefile.in: Regenerated.
libssp/
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist option.
* Makefile.in: Regenerated.
libjava/
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist option.
* Makefile.in: Regenerated.
libjava/libltdl/
* Makefile.am (AUTOMAKE_OPTIONS): Add no-dist option.
* Makefile.in: Regenerated.
libjava/classpath/
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist option.
* Makefile.in: Regenerated.

Modified:
branches/gcc-4_4-branch/libffi/ChangeLog
branches/gcc-4_4-branch/libffi/Makefile.in
branches/gcc-4_4-branch/libffi/configure.ac
branches/gcc-4_4-branch/libgfortran/ChangeLog
branches/gcc-4_4-branch/libgfortran/Makefile.in
branches/gcc-4_4-branch/libgfortran/configure.ac
branches/gcc-4_4-branch/libgomp/ChangeLog
branches/gcc-4_4-branch/libgomp/Makefile.in
branches/gcc-4_4-branch/libgomp/configure.ac
branches/gcc-4_4-branch/libjava/ChangeLog
branches/gcc-4_4-branch/libjava/Makefile.in
branches/gcc-4_4-branch/libjava/classpath/ChangeLog
branches/gcc-4_4-branch/libjava/classpath/Makefile.in
branches/gcc-4_4-branch/libjava/classpath/configure.ac
branches/gcc-4_4-branch/libjava/configure.ac
branches/gcc-4_4-branch/libjava/libltdl/ChangeLog
branches/gcc-4_4-branch/libjava/libltdl/Makefile.am
branches/gcc-4_4-branch/libjava/libltdl/Makefile.in
branches/gcc-4_4-branch/libmudflap/ChangeLog
branches/gcc-4_4-branch/libmudflap/Makefile.in
branches/gcc-4_4-branch/libmudflap/configure.ac
branches/gcc-4_4-branch/libssp/ChangeLog
branches/gcc-4_4-branch/libssp/Makefile.in
branches/gcc-4_4-branch/libssp/configure.ac
branches/gcc-4_4-branch/libstdc++-v3/ChangeLog
branches/gcc-4_4-branch/libstdc++-v3/Makefile.in
branches/gcc-4_4-branch/libstdc++-v3/configure.ac


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #8 from rguenth at gcc dot gnu dot org  2010-04-29 15:10 ---
because we build with bootstrap-debug by default.

Bootstrap works fine for me with and without --enable-plugin.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0


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



[Bug bootstrap/43858] [4.6 Regression] Bootstrap failure for powerpc-apple-darwin9: cannot compute suffix of object files

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


--- Comment #28 from rguenth at gcc dot gnu dot org  2010-04-29 15:11 
---
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED


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



[Bug target/43921] Bootstrap comparison fails when using -march=atom

2010-04-29 Thread nisselarsson at home dot se


--- Comment #3 from nisselarsson at home dot se  2010-04-29 15:21 ---
I can confirm that the patch above applies and gcc-4.5 now complies
successfully.


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #9 from hjl dot tools at gmail dot com  2010-04-29 15:29 ---
Also those failed files call invoke_plugin_callbacks.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

   Target Milestone|4.6.0   |---


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



[Bug tree-optimization/43879] -fipa-pta causes various miscompilations

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


--- Comment #9 from rguenth at gcc dot gnu dot org  2010-04-29 15:29 ---
Wow, thanks for the testcase!


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #10 from hjl dot tools at gmail dot com  2010-04-29 15:31 
---
Do we do inline differently with and without -g?


-- 


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



[Bug tree-optimization/43879] -fipa-pta causes various miscompilations

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


--- Comment #10 from rguenth at gcc dot gnu dot org  2010-04-29 15:37 
---
And the bug is:

struct TBL tbl = { foo };

but:

Generating constraints for global initializers

...
tbl = NONLOCAL
tbl = &NULL

ouch.  I have a patch.


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #11 from jakub at gcc dot gnu dot org  2010-04-29 15:37 ---
No, otherwise -fcompare-debug or even the whole bootstrap comparison which
compares -g -gtoggle built stage2 with -g built stage3 would fail much more
often.

Strangely, I saw the comparison failure on the trunk, but when I recompile
tree-optimize.o with the stage1 gcc and stage2 flags and stage2 gcc with stage3
flags, it is the same after stripping.

Trying new bootstraps again.


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #12 from hjl dot tools at gmail dot com  2010-04-29 15:38 
---
I am testing this patch:

--
diff --git a/gcc/plugin.h b/gcc/plugin.h
index 94663dd..3269641 100644
--- a/gcc/plugin.h
+++ b/gcc/plugin.h
@@ -35,6 +35,8 @@ extern void print_plugins_versions (FILE *file, const char
*in
dent);
 extern void print_plugins_help (FILE *file, const char *indent);
 extern void finalize_plugins (void);

+extern bool flag_plugin_added;
+
 /* Called from inside GCC.  Invoke all plugin callbacks registered with
the specified event.
Return PLUGEVT_SUCCESS if at least one callback was called,
@@ -49,8 +51,6 @@ invoke_plugin_callbacks (int event ATTRIBUTE_UNUSED,
 {
 #ifdef ENABLE_PLUGIN
   /* True iff at least one plugin has been added.  */
-  extern bool flag_plugin_added;
-
   if (flag_plugin_added)
 return invoke_plugin_callbacks_full (event, gcc_data);
 #endif
---

OK if bootstrap passes?


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #13 from hjl dot tools at gmail dot com  2010-04-29 15:57 
---
A patch is posted at

http://gcc.gnu.org/ml/gcc-patches/2010-04/msg01827.html


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2010-
   ||04/msg01827.html


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



[Bug bootstrap/43941] New: Impossible to build any version beyond 4.2.4

2010-04-29 Thread h dot m dot brand at xs4all dot nl
Managed to build gmp-5.0.1, mpfr-2.4.2, and mpc-0.8.1 with gcc-4.2.4/64 (all
-mlp64). Had to set $ABI to 64 to make that pass.

Due to the endless annoying libtool, building with HP C-ANSI-C was impossible.

With that triplet installed, and hand-forced iconv to be unavailable
(--disable-nls does not disable it's use and configure seems to think it is
there where it is not), I had to handcompile version.c because of quotation
errors.
Those are all things I can work around, but here it stops:

/pro/3gl/GNU/gcc/obj/./gcc/xgcc -B/pro/3gl/GNU/gcc/obj/./gcc/
-B/usr/local/ia64/ia64-hp-hpux11.31/bin/
-B/usr/local/ia64/ia64-hp-hpux11.31/lib/ -isystem
/usr/local/ia64/ia64-hp-hpux11.31/include -isystem
/usr/local/ia64/ia64-hp-hpux11.31/sys-include-g -mlp64 -fPIC -mlp64 -O2  -g
-mlp64 -fPIC -DIN_GCC   -DUSE_LIBUNWIND_EXCEPTIONS -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
-isystem ./include   -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../../.././gcc -I../../../../src/libgcc
-I../../../../src/libgcc/. -I../../../../src/libgcc/../gcc
-I../../../../src/libgcc/../include  -DHAVE_CC_TLS  -o _popcountsi2.o -MT
_popcountsi2.o -MD -MP -MF _popcountsi2.dep -DL_popcountsi2 -c
../../../../src/libgcc/../gcc/libgcc2.c \

../../../../src/libgcc/../gcc/libgcc2.c: In function '__popcountdi2':
../../../../src/libgcc/../gcc/libgcc2.c:795:1: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.

It's your own source, so I don't think I have to include it.

(Even HP's porting center gave up after gcc-4.2.3)


-- 
   Summary: Impossible to build any version beyond 4.2.4
   Product: gcc
   Version: 4.5.0
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: bootstrap
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: h dot m dot brand at xs4all dot nl
 GCC build triplet: ia64-hp-hpux11.31
  GCC host triplet: ia64-hp-hpux11.31
GCC target triplet: ia64-hp-hpux11.31


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



[Bug libstdc++/43918] gcc 4.5.0 is failing for i586-pc-msdosdjgpp

2010-04-29 Thread andris dot pavenis at iki dot fi


--- Comment #7 from andris dot pavenis at iki dot fi  2010-04-29 16:27 
---
I had similar patch for this file when I last built GCC for DJGPP (gcc-4.4.2 as
native compiler and gcc-4.4.3 as cross-compiler). The version
for gcc-4.4.2 is in archive
   http://ap1.pp.fi/djgpp/gcc/4.4.2/src/gcc442s2.zip
together with many other patches (unfortunately I did not have time to submit
them). I haven even tried gcc-4.5.0 yet (other things to do)

note: I have FSF copyright assignment for GCC, but for my patches to be usable 
I must get a new employer disclaimer for FSF (different employer).


-- 

andris dot pavenis at iki dot fi changed:

   What|Removed |Added

 CC||andris dot pavenis at iki
   ||dot fi


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



[Bug bootstrap/43935] [4.6 Regression] Bootstrap failure: cc1: all warnings being treated as errors

2010-04-29 Thread hjl at gcc dot gnu dot org


--- Comment #5 from hjl at gcc dot gnu dot org  2010-04-29 16:29 ---
Subject: Bug 43935

Author: hjl
Date: Thu Apr 29 16:29:10 2010
New Revision: 158905

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158905
Log:
Move flag_plugin_added out of invoke_plugin_callbacks.

2010-04-29  H.J. Lu  

PR bootstrap/43935
* plugin.h (flag_plugin_added): Moved out of
invoke_plugin_callbacks.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/plugin.h


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

2010-04-29 Thread hjl at gcc dot gnu dot org


--- Comment #14 from hjl at gcc dot gnu dot org  2010-04-29 17:55 ---
Subject: Bug 43936

Author: hjl
Date: Thu Apr 29 17:55:00 2010
New Revision: 158909

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158909
Log:
Correct entry of fix for PR bootstrap/43936.

Modified:
trunk/gcc/ChangeLog


-- 


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



[Bug debug/43942] New: -fcompare-debug faulure

2010-04-29 Thread hjl dot tools at gmail dot com
>From PR 43936, -fcompare-debug failed with external declaration in function.


-- 
   Summary: -fcompare-debug faulure
   Product: gcc
   Version: 4.6.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


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



[Bug debug/43942] -fcompare-debug faulure

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


--- Comment #1 from hjl dot tools at gmail dot com  2010-04-29 17:57 ---
Created an attachment (id=20518)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20518&action=view)
A testcase

On Linux/x86-64,

[...@gnu-6 stage2-gcc]$ ./xgcc -B./  -c  -g -O2 -Wc++-compat -fno-common
pr43942.i -fcompare-debug
xgcc: pr43942.i: -fcompare-debug failure (length)
[...@gnu-6 stage2-gcc]$ 


-- 


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



[Bug bootstrap/43936] [4.6 regression] Revision 158896 fails to bootstrap

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


--- Comment #15 from hjl dot tools at gmail dot com  2010-04-29 17:59 
---
Fixed.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


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



[Bug debug/43942] -fcompare-debug faulure

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


--- Comment #2 from pinskia at gcc dot gnu dot org  2010-04-29 18:05 ---
Reducing.


-- 


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



[Bug debug/43942] -fcompare-debug faulure

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


--- Comment #3 from hjl dot tools at gmail dot com  2010-04-29 18:16 ---
[...@gnu-6 stage2-gcc]$ cat x.i
enum plugin_event { PLUGIN_GGC_START, PLUGIN_GGC_END };
extern int invoke_plugin_callbacks_full (int, void *);
static __inline__ int
invoke_plugin_callbacks (int event __attribute__ ((__unused__)),
void *gcc_data __attribute__ ((__unused__)))
{
  extern unsigned char flag_plugin_added;
  if (flag_plugin_added)
return invoke_plugin_callbacks_full (event, gcc_data);
  return 3;
}
void
ggc_collect (void)
{
  invoke_plugin_callbacks (PLUGIN_GGC_START, ((void *)0));
  invoke_plugin_callbacks (PLUGIN_GGC_END, ((void *)0));
}
[...@gnu-6 stage2-gcc]$ ./xgcc -B./  -c  -g -O2  x.i -fcompare-debug
xgcc: x.i: -fcompare-debug failure (length)
[...@gnu-6 stage2-gcc]$ 


-- 


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



[Bug debug/43942] -fcompare-debug faulure with external declaration in function.

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


--- Comment #4 from hjl dot tools at gmail dot com  2010-04-29 18:18 ---
It also failed with gcc 4.5.0.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

  Known to fail||4.5.0 4.6.0
Summary|-fcompare-debug faulure |-fcompare-debug faulure with
   ||external declaration in
   ||function.


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



[Bug debug/43942] -fcompare-debug faulure with external declaration in function.

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


--- Comment #5 from hjl dot tools at gmail dot com  2010-04-29 18:23 ---
Tail call optimization is disabled with -g.


-- 


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



[Bug debug/43942] -fcompare-debug failure with external declaration in function

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


--- Comment #6 from hjl dot tools at gmail dot com  2010-04-29 18:26 ---
-foptimize-sibling-calls is affected by external declaration in function.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

Summary|-fcompare-debug faulure with|-fcompare-debug failure with
   |external declaration in |external declaration in
   |function.   |function


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



[Bug debug/43942] [4.5/4.6 Regression] -fcompare-debug faulure with external declaration in function.

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


--- Comment #7 from pinskia at gcc dot gnu dot org  2010-04-29 18:27 ---
Even more reduced testcase:
invoke_plugin_callbacks (int event)
{
  extern unsigned char flag_plugin_added;
  return invoke_plugin_callbacks_full (event);
}
ggc_collect (void)
{
  invoke_plugin_callbacks (0);
}


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Keywords||build, wrong-code
   Last reconfirmed|-00-00 00:00:00 |2010-04-29 18:27:21
   date||
Summary|-fcompare-debug failure with|[4.5/4.6 Regression] -
   |external declaration in |fcompare-debug faulure with
   |function|external declaration in
   ||function.
   Target Milestone|--- |4.5.1


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



[Bug debug/43942] [4.5/4.6 Regression] -fcompare-debug faulure with external declaration in function.

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


--- Comment #8 from hjl dot tools at gmail dot com  2010-04-29 18:44 ---
Tail call optimization doesn't handle

# DEBUG event => 0

properly.


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

   Target Milestone|4.5.1   |---


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



[Bug fortran/42958] Weird temporary array allocation

2010-04-29 Thread tkoenig at gcc dot gnu dot org


--- Comment #24 from tkoenig at gcc dot gnu dot org  2010-04-29 19:09 
---
(In reply to comment #22)

> It is my intention to change the array descriptor representation and
> to start with an API that provides the (lbound, ubound,stride) values.
>  In fact, this API has already been put in place in the FE but is
> incompletely implemented in the library (or, at least, last time I
> looked).

If you find anything still missing in the library, please let me know.
I thought I had converted everything to the macros, which are fairly
easy to change, but I may be mistaken.


-- 

tkoenig at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||tkoenig at gcc dot gnu dot
   ||org


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



[Bug fortran/42680] [fortran-dev, Regression] ICE in gimplify_expr, at gimplify.c:7176

2010-04-29 Thread pault at gcc dot gnu dot org


--- Comment #13 from pault at gcc dot gnu dot org  2010-04-29 19:11 ---
Subject: Bug 42680

Author: pault
Date: Thu Apr 29 19:10:48 2010
New Revision: 158910

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158910
Log:
2010-04-29  Janus Weil  

PR fortran/43896
* symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
initializers for PPC members of the vtabs.

2010-04-29  Janus Weil  

PR fortran/42274
* symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
attribute for all PPC members of the vtypes.
(copy_vtab_proc_comps): Copy the correct interface.
* trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
* trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
a dummy argument and make sure all PPC members of the vtab are
initialized correctly.
(gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
in call to gfc_trans_assign_vtab_procs.
* trans-stmt.c (gfc_trans_allocate): Ditto.

2010-04-29  Paul Thomas  

PR fortran/43326
* resolve.c (resolve_typebound_function): Renamed
resolve_class_compcall.Do all the detection of class references
here.
(resolve_typebound_subroutine): resolve_class_typebound_call
renamed. Otherwise same as resolve_typebound_function.
(gfc_resolve_expr): Call resolve_typebound_function.
(resolve_code): Call resolve_typebound_subroutine.

2010-04-29  Janus Weil  

PR fortran/43492
* resolve.c (resolve_typebound_generic_call): For CLASS methods
pass back the specific symtree name, rather than the target
name.

2010-04-29  Paul Thomas  

PR fortran/42353
* resolve.c (resolve_structure_cons): Make the initializer of
the vtab component 'extends' the same type as the component.

2010-04-29  Jerry DeLisle  

PR fortran/42680
* interface.c (check_interface1): Pass symbol name rather than NULL to
gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
trap MULL. (gfc_compare_derived_types): Revert previous change
incorporated incorrectly during merge from trunk, r155778.
* resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
than NULL to gfc_compare_interfaces.
* symbol.c (add_generic_specifics): Likewise.

2010-02-29  Janus Weil  

PR fortran/42353
* interface.c (gfc_compare_derived_types): Add condition for vtype.
* symbol.c (gfc_find_derived_vtab): Sey access to private.
(gfc_find_derived_vtab): Likewise.
* module.c (ab_attribute): Add enumerator AB_VTAB.
(mio_symbol_attribute): Use new attribute, AB_VTAB.
(check_for_ambiguous): Likewise.

2010-04-29  Paul Thomas  
Janus Weil  

PR fortran/41829
* trans-expr.c (select_class_proc): Remove function.
(conv_function_val): Delete reference to previous.
(gfc_conv_derived_to_class): Add second argument to the call to
gfc_find_derived_vtab.
(gfc_conv_structure): Exclude proc_pointer components when
accessing $data field of class objects.
(gfc_trans_assign_vtab_procs): New function.
(gfc_trans_class_assign): Add second argument to the call to
gfc_find_derived_vtab.
* symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
implement holding off searching for the vptr derived type.
(add_proc_component): New function.
(add_proc_comps): New function.
(add_procs_to_declared_vtab1): New function.
(copy_vtab_proc_comps): New function.
(add_procs_to_declared_vtab): New function.
(void add_generic_specifics): New function.
(add_generics_to_declared_vtab): New function.
(gfc_find_derived_vtab): Add second argument to the call to
gfc_find_derived_vtab. Add the calls to
add_procs_to_declared_vtab and add_generics_to_declared_vtab.
* decl.c (build_sym, build_struct): Use new arg in calls to
gfc_build_class_symbol.
* gfortran.h : Add vtype bitfield to symbol_attr. Remove the
definition of struct gfc_class_esym_list. Modify prototypes
of gfc_build_class_symbol and gfc_find_derived_vtab.
* trans-stmt.c (gfc_trans_allocate): Add second argument to the
call to gfc_find_derived_vtab.
* module.c : Add the vtype attribute.
* trans.h : Add prototype for gfc_trans_assign_vtab_procs.
* resolve.c (resolve_typebound_generic_call): Add second arg
to pass along the generic name for class methods.
(resolve_typebound_call): The same.
(resolve_compcall): Use the second arg to carry the generic
name from the above. Remove the reference to class_esym.
(check_members, check_class_members, resolve_class_esym,
hash_value_expr): Remov

[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault

2010-04-29 Thread pault at gcc dot gnu dot org


--- Comment #38 from pault at gcc dot gnu dot org  2010-04-29 19:11 ---
Subject: Bug 42274

Author: pault
Date: Thu Apr 29 19:10:48 2010
New Revision: 158910

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158910
Log:
2010-04-29  Janus Weil  

PR fortran/43896
* symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
initializers for PPC members of the vtabs.

2010-04-29  Janus Weil  

PR fortran/42274
* symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
attribute for all PPC members of the vtypes.
(copy_vtab_proc_comps): Copy the correct interface.
* trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
* trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
a dummy argument and make sure all PPC members of the vtab are
initialized correctly.
(gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
in call to gfc_trans_assign_vtab_procs.
* trans-stmt.c (gfc_trans_allocate): Ditto.

2010-04-29  Paul Thomas  

PR fortran/43326
* resolve.c (resolve_typebound_function): Renamed
resolve_class_compcall.Do all the detection of class references
here.
(resolve_typebound_subroutine): resolve_class_typebound_call
renamed. Otherwise same as resolve_typebound_function.
(gfc_resolve_expr): Call resolve_typebound_function.
(resolve_code): Call resolve_typebound_subroutine.

2010-04-29  Janus Weil  

PR fortran/43492
* resolve.c (resolve_typebound_generic_call): For CLASS methods
pass back the specific symtree name, rather than the target
name.

2010-04-29  Paul Thomas  

PR fortran/42353
* resolve.c (resolve_structure_cons): Make the initializer of
the vtab component 'extends' the same type as the component.

2010-04-29  Jerry DeLisle  

PR fortran/42680
* interface.c (check_interface1): Pass symbol name rather than NULL to
gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
trap MULL. (gfc_compare_derived_types): Revert previous change
incorporated incorrectly during merge from trunk, r155778.
* resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
than NULL to gfc_compare_interfaces.
* symbol.c (add_generic_specifics): Likewise.

2010-02-29  Janus Weil  

PR fortran/42353
* interface.c (gfc_compare_derived_types): Add condition for vtype.
* symbol.c (gfc_find_derived_vtab): Sey access to private.
(gfc_find_derived_vtab): Likewise.
* module.c (ab_attribute): Add enumerator AB_VTAB.
(mio_symbol_attribute): Use new attribute, AB_VTAB.
(check_for_ambiguous): Likewise.

2010-04-29  Paul Thomas  
Janus Weil  

PR fortran/41829
* trans-expr.c (select_class_proc): Remove function.
(conv_function_val): Delete reference to previous.
(gfc_conv_derived_to_class): Add second argument to the call to
gfc_find_derived_vtab.
(gfc_conv_structure): Exclude proc_pointer components when
accessing $data field of class objects.
(gfc_trans_assign_vtab_procs): New function.
(gfc_trans_class_assign): Add second argument to the call to
gfc_find_derived_vtab.
* symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
implement holding off searching for the vptr derived type.
(add_proc_component): New function.
(add_proc_comps): New function.
(add_procs_to_declared_vtab1): New function.
(copy_vtab_proc_comps): New function.
(add_procs_to_declared_vtab): New function.
(void add_generic_specifics): New function.
(add_generics_to_declared_vtab): New function.
(gfc_find_derived_vtab): Add second argument to the call to
gfc_find_derived_vtab. Add the calls to
add_procs_to_declared_vtab and add_generics_to_declared_vtab.
* decl.c (build_sym, build_struct): Use new arg in calls to
gfc_build_class_symbol.
* gfortran.h : Add vtype bitfield to symbol_attr. Remove the
definition of struct gfc_class_esym_list. Modify prototypes
of gfc_build_class_symbol and gfc_find_derived_vtab.
* trans-stmt.c (gfc_trans_allocate): Add second argument to the
call to gfc_find_derived_vtab.
* module.c : Add the vtype attribute.
* trans.h : Add prototype for gfc_trans_assign_vtab_procs.
* resolve.c (resolve_typebound_generic_call): Add second arg
to pass along the generic name for class methods.
(resolve_typebound_call): The same.
(resolve_compcall): Use the second arg to carry the generic
name from the above. Remove the reference to class_esym.
(check_members, check_class_members, resolve_class_esym,
hash_value_expr): Remov

[Bug fortran/43492] [fortran-dev Regression] ICE in gfc_add_component_ref, at fortran/expr.c:352

2010-04-29 Thread pault at gcc dot gnu dot org


--- Comment #8 from pault at gcc dot gnu dot org  2010-04-29 19:11 ---
Subject: Bug 43492

Author: pault
Date: Thu Apr 29 19:10:48 2010
New Revision: 158910

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158910
Log:
2010-04-29  Janus Weil  

PR fortran/43896
* symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
initializers for PPC members of the vtabs.

2010-04-29  Janus Weil  

PR fortran/42274
* symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
attribute for all PPC members of the vtypes.
(copy_vtab_proc_comps): Copy the correct interface.
* trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
* trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
a dummy argument and make sure all PPC members of the vtab are
initialized correctly.
(gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
in call to gfc_trans_assign_vtab_procs.
* trans-stmt.c (gfc_trans_allocate): Ditto.

2010-04-29  Paul Thomas  

PR fortran/43326
* resolve.c (resolve_typebound_function): Renamed
resolve_class_compcall.Do all the detection of class references
here.
(resolve_typebound_subroutine): resolve_class_typebound_call
renamed. Otherwise same as resolve_typebound_function.
(gfc_resolve_expr): Call resolve_typebound_function.
(resolve_code): Call resolve_typebound_subroutine.

2010-04-29  Janus Weil  

PR fortran/43492
* resolve.c (resolve_typebound_generic_call): For CLASS methods
pass back the specific symtree name, rather than the target
name.

2010-04-29  Paul Thomas  

PR fortran/42353
* resolve.c (resolve_structure_cons): Make the initializer of
the vtab component 'extends' the same type as the component.

2010-04-29  Jerry DeLisle  

PR fortran/42680
* interface.c (check_interface1): Pass symbol name rather than NULL to
gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
trap MULL. (gfc_compare_derived_types): Revert previous change
incorporated incorrectly during merge from trunk, r155778.
* resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
than NULL to gfc_compare_interfaces.
* symbol.c (add_generic_specifics): Likewise.

2010-02-29  Janus Weil  

PR fortran/42353
* interface.c (gfc_compare_derived_types): Add condition for vtype.
* symbol.c (gfc_find_derived_vtab): Sey access to private.
(gfc_find_derived_vtab): Likewise.
* module.c (ab_attribute): Add enumerator AB_VTAB.
(mio_symbol_attribute): Use new attribute, AB_VTAB.
(check_for_ambiguous): Likewise.

2010-04-29  Paul Thomas  
Janus Weil  

PR fortran/41829
* trans-expr.c (select_class_proc): Remove function.
(conv_function_val): Delete reference to previous.
(gfc_conv_derived_to_class): Add second argument to the call to
gfc_find_derived_vtab.
(gfc_conv_structure): Exclude proc_pointer components when
accessing $data field of class objects.
(gfc_trans_assign_vtab_procs): New function.
(gfc_trans_class_assign): Add second argument to the call to
gfc_find_derived_vtab.
* symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
implement holding off searching for the vptr derived type.
(add_proc_component): New function.
(add_proc_comps): New function.
(add_procs_to_declared_vtab1): New function.
(copy_vtab_proc_comps): New function.
(add_procs_to_declared_vtab): New function.
(void add_generic_specifics): New function.
(add_generics_to_declared_vtab): New function.
(gfc_find_derived_vtab): Add second argument to the call to
gfc_find_derived_vtab. Add the calls to
add_procs_to_declared_vtab and add_generics_to_declared_vtab.
* decl.c (build_sym, build_struct): Use new arg in calls to
gfc_build_class_symbol.
* gfortran.h : Add vtype bitfield to symbol_attr. Remove the
definition of struct gfc_class_esym_list. Modify prototypes
of gfc_build_class_symbol and gfc_find_derived_vtab.
* trans-stmt.c (gfc_trans_allocate): Add second argument to the
call to gfc_find_derived_vtab.
* module.c : Add the vtype attribute.
* trans.h : Add prototype for gfc_trans_assign_vtab_procs.
* resolve.c (resolve_typebound_generic_call): Add second arg
to pass along the generic name for class methods.
(resolve_typebound_call): The same.
(resolve_compcall): Use the second arg to carry the generic
name from the above. Remove the reference to class_esym.
(check_members, check_class_members, resolve_class_esym,
hash_value_expr): Remove

[Bug fortran/42353] [fortran-dev] Bogus Error: Name 'vtype$...' at (1) is an ambiguous reference ...

2010-04-29 Thread pault at gcc dot gnu dot org


--- Comment #33 from pault at gcc dot gnu dot org  2010-04-29 19:11 ---
Subject: Bug 42353

Author: pault
Date: Thu Apr 29 19:10:48 2010
New Revision: 158910

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158910
Log:
2010-04-29  Janus Weil  

PR fortran/43896
* symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
initializers for PPC members of the vtabs.

2010-04-29  Janus Weil  

PR fortran/42274
* symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
attribute for all PPC members of the vtypes.
(copy_vtab_proc_comps): Copy the correct interface.
* trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
* trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
a dummy argument and make sure all PPC members of the vtab are
initialized correctly.
(gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
in call to gfc_trans_assign_vtab_procs.
* trans-stmt.c (gfc_trans_allocate): Ditto.

2010-04-29  Paul Thomas  

PR fortran/43326
* resolve.c (resolve_typebound_function): Renamed
resolve_class_compcall.Do all the detection of class references
here.
(resolve_typebound_subroutine): resolve_class_typebound_call
renamed. Otherwise same as resolve_typebound_function.
(gfc_resolve_expr): Call resolve_typebound_function.
(resolve_code): Call resolve_typebound_subroutine.

2010-04-29  Janus Weil  

PR fortran/43492
* resolve.c (resolve_typebound_generic_call): For CLASS methods
pass back the specific symtree name, rather than the target
name.

2010-04-29  Paul Thomas  

PR fortran/42353
* resolve.c (resolve_structure_cons): Make the initializer of
the vtab component 'extends' the same type as the component.

2010-04-29  Jerry DeLisle  

PR fortran/42680
* interface.c (check_interface1): Pass symbol name rather than NULL to
gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
trap MULL. (gfc_compare_derived_types): Revert previous change
incorporated incorrectly during merge from trunk, r155778.
* resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
than NULL to gfc_compare_interfaces.
* symbol.c (add_generic_specifics): Likewise.

2010-02-29  Janus Weil  

PR fortran/42353
* interface.c (gfc_compare_derived_types): Add condition for vtype.
* symbol.c (gfc_find_derived_vtab): Sey access to private.
(gfc_find_derived_vtab): Likewise.
* module.c (ab_attribute): Add enumerator AB_VTAB.
(mio_symbol_attribute): Use new attribute, AB_VTAB.
(check_for_ambiguous): Likewise.

2010-04-29  Paul Thomas  
Janus Weil  

PR fortran/41829
* trans-expr.c (select_class_proc): Remove function.
(conv_function_val): Delete reference to previous.
(gfc_conv_derived_to_class): Add second argument to the call to
gfc_find_derived_vtab.
(gfc_conv_structure): Exclude proc_pointer components when
accessing $data field of class objects.
(gfc_trans_assign_vtab_procs): New function.
(gfc_trans_class_assign): Add second argument to the call to
gfc_find_derived_vtab.
* symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
implement holding off searching for the vptr derived type.
(add_proc_component): New function.
(add_proc_comps): New function.
(add_procs_to_declared_vtab1): New function.
(copy_vtab_proc_comps): New function.
(add_procs_to_declared_vtab): New function.
(void add_generic_specifics): New function.
(add_generics_to_declared_vtab): New function.
(gfc_find_derived_vtab): Add second argument to the call to
gfc_find_derived_vtab. Add the calls to
add_procs_to_declared_vtab and add_generics_to_declared_vtab.
* decl.c (build_sym, build_struct): Use new arg in calls to
gfc_build_class_symbol.
* gfortran.h : Add vtype bitfield to symbol_attr. Remove the
definition of struct gfc_class_esym_list. Modify prototypes
of gfc_build_class_symbol and gfc_find_derived_vtab.
* trans-stmt.c (gfc_trans_allocate): Add second argument to the
call to gfc_find_derived_vtab.
* module.c : Add the vtype attribute.
* trans.h : Add prototype for gfc_trans_assign_vtab_procs.
* resolve.c (resolve_typebound_generic_call): Add second arg
to pass along the generic name for class methods.
(resolve_typebound_call): The same.
(resolve_compcall): Use the second arg to carry the generic
name from the above. Remove the reference to class_esym.
(check_members, check_class_members, resolve_class_esym,
hash_value_expr): Remov

[Bug fortran/41829] [OOP] Runtime error with dynamic dispatching

2010-04-29 Thread pault at gcc dot gnu dot org


--- Comment #6 from pault at gcc dot gnu dot org  2010-04-29 19:11 ---
Subject: Bug 41829

Author: pault
Date: Thu Apr 29 19:10:48 2010
New Revision: 158910

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158910
Log:
2010-04-29  Janus Weil  

PR fortran/43896
* symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
initializers for PPC members of the vtabs.

2010-04-29  Janus Weil  

PR fortran/42274
* symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
attribute for all PPC members of the vtypes.
(copy_vtab_proc_comps): Copy the correct interface.
* trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
* trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
a dummy argument and make sure all PPC members of the vtab are
initialized correctly.
(gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
in call to gfc_trans_assign_vtab_procs.
* trans-stmt.c (gfc_trans_allocate): Ditto.

2010-04-29  Paul Thomas  

PR fortran/43326
* resolve.c (resolve_typebound_function): Renamed
resolve_class_compcall.Do all the detection of class references
here.
(resolve_typebound_subroutine): resolve_class_typebound_call
renamed. Otherwise same as resolve_typebound_function.
(gfc_resolve_expr): Call resolve_typebound_function.
(resolve_code): Call resolve_typebound_subroutine.

2010-04-29  Janus Weil  

PR fortran/43492
* resolve.c (resolve_typebound_generic_call): For CLASS methods
pass back the specific symtree name, rather than the target
name.

2010-04-29  Paul Thomas  

PR fortran/42353
* resolve.c (resolve_structure_cons): Make the initializer of
the vtab component 'extends' the same type as the component.

2010-04-29  Jerry DeLisle  

PR fortran/42680
* interface.c (check_interface1): Pass symbol name rather than NULL to
gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
trap MULL. (gfc_compare_derived_types): Revert previous change
incorporated incorrectly during merge from trunk, r155778.
* resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
than NULL to gfc_compare_interfaces.
* symbol.c (add_generic_specifics): Likewise.

2010-02-29  Janus Weil  

PR fortran/42353
* interface.c (gfc_compare_derived_types): Add condition for vtype.
* symbol.c (gfc_find_derived_vtab): Sey access to private.
(gfc_find_derived_vtab): Likewise.
* module.c (ab_attribute): Add enumerator AB_VTAB.
(mio_symbol_attribute): Use new attribute, AB_VTAB.
(check_for_ambiguous): Likewise.

2010-04-29  Paul Thomas  
Janus Weil  

PR fortran/41829
* trans-expr.c (select_class_proc): Remove function.
(conv_function_val): Delete reference to previous.
(gfc_conv_derived_to_class): Add second argument to the call to
gfc_find_derived_vtab.
(gfc_conv_structure): Exclude proc_pointer components when
accessing $data field of class objects.
(gfc_trans_assign_vtab_procs): New function.
(gfc_trans_class_assign): Add second argument to the call to
gfc_find_derived_vtab.
* symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
implement holding off searching for the vptr derived type.
(add_proc_component): New function.
(add_proc_comps): New function.
(add_procs_to_declared_vtab1): New function.
(copy_vtab_proc_comps): New function.
(add_procs_to_declared_vtab): New function.
(void add_generic_specifics): New function.
(add_generics_to_declared_vtab): New function.
(gfc_find_derived_vtab): Add second argument to the call to
gfc_find_derived_vtab. Add the calls to
add_procs_to_declared_vtab and add_generics_to_declared_vtab.
* decl.c (build_sym, build_struct): Use new arg in calls to
gfc_build_class_symbol.
* gfortran.h : Add vtype bitfield to symbol_attr. Remove the
definition of struct gfc_class_esym_list. Modify prototypes
of gfc_build_class_symbol and gfc_find_derived_vtab.
* trans-stmt.c (gfc_trans_allocate): Add second argument to the
call to gfc_find_derived_vtab.
* module.c : Add the vtype attribute.
* trans.h : Add prototype for gfc_trans_assign_vtab_procs.
* resolve.c (resolve_typebound_generic_call): Add second arg
to pass along the generic name for class methods.
(resolve_typebound_call): The same.
(resolve_compcall): Use the second arg to carry the generic
name from the above. Remove the reference to class_esym.
(check_members, check_class_members, resolve_class_esym,
hash_value_expr): Remove

[Bug fortran/43896] [OOP] ICE in gfc_conv_variable, at fortran/trans-expr.c:551

2010-04-29 Thread pault at gcc dot gnu dot org


--- Comment #16 from pault at gcc dot gnu dot org  2010-04-29 19:11 ---
Subject: Bug 43896

Author: pault
Date: Thu Apr 29 19:10:48 2010
New Revision: 158910

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158910
Log:
2010-04-29  Janus Weil  

PR fortran/43896
* symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
initializers for PPC members of the vtabs.

2010-04-29  Janus Weil  

PR fortran/42274
* symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
attribute for all PPC members of the vtypes.
(copy_vtab_proc_comps): Copy the correct interface.
* trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
* trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
a dummy argument and make sure all PPC members of the vtab are
initialized correctly.
(gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
in call to gfc_trans_assign_vtab_procs.
* trans-stmt.c (gfc_trans_allocate): Ditto.

2010-04-29  Paul Thomas  

PR fortran/43326
* resolve.c (resolve_typebound_function): Renamed
resolve_class_compcall.Do all the detection of class references
here.
(resolve_typebound_subroutine): resolve_class_typebound_call
renamed. Otherwise same as resolve_typebound_function.
(gfc_resolve_expr): Call resolve_typebound_function.
(resolve_code): Call resolve_typebound_subroutine.

2010-04-29  Janus Weil  

PR fortran/43492
* resolve.c (resolve_typebound_generic_call): For CLASS methods
pass back the specific symtree name, rather than the target
name.

2010-04-29  Paul Thomas  

PR fortran/42353
* resolve.c (resolve_structure_cons): Make the initializer of
the vtab component 'extends' the same type as the component.

2010-04-29  Jerry DeLisle  

PR fortran/42680
* interface.c (check_interface1): Pass symbol name rather than NULL to
gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
trap MULL. (gfc_compare_derived_types): Revert previous change
incorporated incorrectly during merge from trunk, r155778.
* resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
than NULL to gfc_compare_interfaces.
* symbol.c (add_generic_specifics): Likewise.

2010-02-29  Janus Weil  

PR fortran/42353
* interface.c (gfc_compare_derived_types): Add condition for vtype.
* symbol.c (gfc_find_derived_vtab): Sey access to private.
(gfc_find_derived_vtab): Likewise.
* module.c (ab_attribute): Add enumerator AB_VTAB.
(mio_symbol_attribute): Use new attribute, AB_VTAB.
(check_for_ambiguous): Likewise.

2010-04-29  Paul Thomas  
Janus Weil  

PR fortran/41829
* trans-expr.c (select_class_proc): Remove function.
(conv_function_val): Delete reference to previous.
(gfc_conv_derived_to_class): Add second argument to the call to
gfc_find_derived_vtab.
(gfc_conv_structure): Exclude proc_pointer components when
accessing $data field of class objects.
(gfc_trans_assign_vtab_procs): New function.
(gfc_trans_class_assign): Add second argument to the call to
gfc_find_derived_vtab.
* symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
implement holding off searching for the vptr derived type.
(add_proc_component): New function.
(add_proc_comps): New function.
(add_procs_to_declared_vtab1): New function.
(copy_vtab_proc_comps): New function.
(add_procs_to_declared_vtab): New function.
(void add_generic_specifics): New function.
(add_generics_to_declared_vtab): New function.
(gfc_find_derived_vtab): Add second argument to the call to
gfc_find_derived_vtab. Add the calls to
add_procs_to_declared_vtab and add_generics_to_declared_vtab.
* decl.c (build_sym, build_struct): Use new arg in calls to
gfc_build_class_symbol.
* gfortran.h : Add vtype bitfield to symbol_attr. Remove the
definition of struct gfc_class_esym_list. Modify prototypes
of gfc_build_class_symbol and gfc_find_derived_vtab.
* trans-stmt.c (gfc_trans_allocate): Add second argument to the
call to gfc_find_derived_vtab.
* module.c : Add the vtype attribute.
* trans.h : Add prototype for gfc_trans_assign_vtab_procs.
* resolve.c (resolve_typebound_generic_call): Add second arg
to pass along the generic name for class methods.
(resolve_typebound_call): The same.
(resolve_compcall): Use the second arg to carry the generic
name from the above. Remove the reference to class_esym.
(check_members, check_class_members, resolve_class_esym,
hash_value_expr): Remov

[Bug fortran/43326] [fortran-dev Regression] dynamic dispatch with CLASS components

2010-04-29 Thread pault at gcc dot gnu dot org


--- Comment #13 from pault at gcc dot gnu dot org  2010-04-29 19:11 ---
Subject: Bug 43326

Author: pault
Date: Thu Apr 29 19:10:48 2010
New Revision: 158910

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=158910
Log:
2010-04-29  Janus Weil  

PR fortran/43896
* symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
initializers for PPC members of the vtabs.

2010-04-29  Janus Weil  

PR fortran/42274
* symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
attribute for all PPC members of the vtypes.
(copy_vtab_proc_comps): Copy the correct interface.
* trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
* trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
a dummy argument and make sure all PPC members of the vtab are
initialized correctly.
(gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
in call to gfc_trans_assign_vtab_procs.
* trans-stmt.c (gfc_trans_allocate): Ditto.

2010-04-29  Paul Thomas  

PR fortran/43326
* resolve.c (resolve_typebound_function): Renamed
resolve_class_compcall.Do all the detection of class references
here.
(resolve_typebound_subroutine): resolve_class_typebound_call
renamed. Otherwise same as resolve_typebound_function.
(gfc_resolve_expr): Call resolve_typebound_function.
(resolve_code): Call resolve_typebound_subroutine.

2010-04-29  Janus Weil  

PR fortran/43492
* resolve.c (resolve_typebound_generic_call): For CLASS methods
pass back the specific symtree name, rather than the target
name.

2010-04-29  Paul Thomas  

PR fortran/42353
* resolve.c (resolve_structure_cons): Make the initializer of
the vtab component 'extends' the same type as the component.

2010-04-29  Jerry DeLisle  

PR fortran/42680
* interface.c (check_interface1): Pass symbol name rather than NULL to
gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
trap MULL. (gfc_compare_derived_types): Revert previous change
incorporated incorrectly during merge from trunk, r155778.
* resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
than NULL to gfc_compare_interfaces.
* symbol.c (add_generic_specifics): Likewise.

2010-02-29  Janus Weil  

PR fortran/42353
* interface.c (gfc_compare_derived_types): Add condition for vtype.
* symbol.c (gfc_find_derived_vtab): Sey access to private.
(gfc_find_derived_vtab): Likewise.
* module.c (ab_attribute): Add enumerator AB_VTAB.
(mio_symbol_attribute): Use new attribute, AB_VTAB.
(check_for_ambiguous): Likewise.

2010-04-29  Paul Thomas  
Janus Weil  

PR fortran/41829
* trans-expr.c (select_class_proc): Remove function.
(conv_function_val): Delete reference to previous.
(gfc_conv_derived_to_class): Add second argument to the call to
gfc_find_derived_vtab.
(gfc_conv_structure): Exclude proc_pointer components when
accessing $data field of class objects.
(gfc_trans_assign_vtab_procs): New function.
(gfc_trans_class_assign): Add second argument to the call to
gfc_find_derived_vtab.
* symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
implement holding off searching for the vptr derived type.
(add_proc_component): New function.
(add_proc_comps): New function.
(add_procs_to_declared_vtab1): New function.
(copy_vtab_proc_comps): New function.
(add_procs_to_declared_vtab): New function.
(void add_generic_specifics): New function.
(add_generics_to_declared_vtab): New function.
(gfc_find_derived_vtab): Add second argument to the call to
gfc_find_derived_vtab. Add the calls to
add_procs_to_declared_vtab and add_generics_to_declared_vtab.
* decl.c (build_sym, build_struct): Use new arg in calls to
gfc_build_class_symbol.
* gfortran.h : Add vtype bitfield to symbol_attr. Remove the
definition of struct gfc_class_esym_list. Modify prototypes
of gfc_build_class_symbol and gfc_find_derived_vtab.
* trans-stmt.c (gfc_trans_allocate): Add second argument to the
call to gfc_find_derived_vtab.
* module.c : Add the vtype attribute.
* trans.h : Add prototype for gfc_trans_assign_vtab_procs.
* resolve.c (resolve_typebound_generic_call): Add second arg
to pass along the generic name for class methods.
(resolve_typebound_call): The same.
(resolve_compcall): Use the second arg to carry the generic
name from the above. Remove the reference to class_esym.
(check_members, check_class_members, resolve_class_esym,
hash_value_expr): Remov

[Bug debug/43942] [4.5/4.6 Regression] -fcompare-debug faulure with external declaration in function.

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


--- Comment #9 from hjl dot tools at gmail dot com  2010-04-29 19:16 ---
This patch

---
diff --git a/gcc/tree.c b/gcc/tree.c
index 8eeecff..0d79020 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -7937,7 +7937,8 @@ auto_var_in_fn_p (const_tree var, const_tree fn)
 {
   return (DECL_P (var) && DECL_CONTEXT (var) == fn
 && (((TREE_CODE (var) == VAR_DECL || TREE_CODE (var) == PARM_DECL)
- && ! TREE_STATIC (var))
+ && ! TREE_STATIC (var)
+ && ! TREE_PUBLIC (var))
 || TREE_CODE (var) == LABEL_DECL
 || TREE_CODE (var) == RESULT_DECL));
 }
---

works for me.


-- 


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



[Bug debug/43942] [4.5/4.6 Regression] -fcompare-debug faulure with external declaration in function.

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


--- Comment #10 from jakub at gcc dot gnu dot org  2010-04-29 19:23 ---
That doesn't sound like the right fix.

I'll look into this.


-- 

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|2010-04-29 18:27:21 |2010-04-29 19:23:46
   date||


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



[Bug bootstrap/42347] [4.5/4.6 Regression] sched-deps.c:3840:1: internal compiler error: in fixup_reorder_chain, at cfglayout.c:796

2010-04-29 Thread armin76 at gentoo dot org


--- Comment #14 from armin76 at gentoo dot org  2010-04-29 19:36 ---
I tried to bisect it, however there is an issue:

gcc failed to build since
http://repo.or.cz/w/official-gcc.git/commit/598767c938d0d001bbbe41e0a189104bb53e3580

Gives this error:
/root/build/./prev-gcc/xgcc -B/root/build/./prev-gcc/
-B/usr/powerpc64-unknown-linux-gnu/bin/ -B/usr/powerpc64-unknown-linux-gnu/bin/
-B/usr/powerpc64-unknown-linux-gnu/lib/ -isystem
/usr/powerpc64-unknown-linux-gnu/include -isystem
/usr/powerpc64-unknown-linux-gnu/sys-include-c  -m64 -O2 -pipe -gtoggle
-DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -Wold-style-definition
-Wc++-compat   -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/.
-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd
-I../libdecnumber../../gcc/gcc/lambda-code.c -o lambda-code.o
../../gcc/gcc/lambda-code.c: In function 'lambda_compute_access_matrices':
../../gcc/gcc/lambda-code.c:2844:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[3]: *** [lambda-code.o] Error 1

That error was fixed with
http://repo.or.cz/w/official-gcc.git/commit/9dbb96fec5e08762f97dda771522283f1fe9710f

However we now got that error of what this bug is about.


-- 


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



[Bug c++/43943] New: "warning: no return statement in function returning non-void" should be an error

2010-04-29 Thread david at rothlis dot net
I know that dozens of bugs have been opened for this over the years, but please
read this through.

If you have a C++ program missing a return statement from a function that is
supposed to return a value, g++ will compile it happily with no errors (or even
a warning, unless -Wreturn-type or -Wall is used). Trying to use the return
value from the function will most likely cause a segmentation fault. Dozens of
bugs have been opened for this over the years (e.g. bug 11474), all rejected as
invalid based on the following statement from section 6.6.3 of the C++
standard:

  Flowing off the end of a function is equivalent to a return with no value;
  this results in undefined behavior in a value-returning function.

However, the very same paragraph begins with:

  A return statement without an expression can be used only in functions 
  that do not return a value, that is, a function with the return type void,
  a constructor (12.1), or a destructor (12.4).

In my opinion, the standard contradicts itself. Either flowing off the end of a
function is "equivalent to a return with no value" (i.e. invalid according to
the beginning of the paragraph) or it is "undefined behaviour". It can't be
both.

Appendix C is informative rather than normative, but can help us understand the
intent of the standard. Section C.1.4 says:

  Change: It is now invalid to return (explicitly or implicitly) from a
  function which is declared to return a value without actually returning a
  value.
  Rationale: The caller and callee may assume fairly elaborate return-value
  mechanisms for the return of class objects. If some flow paths execute a
  return without specifying any value, the implementation must embody many more
  complications. Besides, promising to return a value of a given type, and then
  not returning such a value, has always been recognized to be a questionable
  practice, tolerated only because very-old C had no distinction between void
  functions and int functions.

The number of bugs opened for this issue over the years indicates how
surprising the current behaviour is. Since it is not always practical to enable
-Werror on large codebases, I think this should be an error by default.


-- 
   Summary: "warning: no return statement in function returning non-
void" should be an error
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: david at rothlis dot net


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



  1   2   >