[Bug debug/46704] [4.6 Regression] Ada compiler fails to build itself

2011-01-11 Thread ebotcazou at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46704

--- Comment #13 from Eric Botcazou  2011-01-12 
07:47:09 UTC ---
> It looks like the fix came after the first gcc was built, so I should rebuild
> it with Jan 9 snapshot using --disable-bootstrap, install it, and then rebuild
> it again with disable snapshot?

Yes, the problem is in the build compiler, not in the to-be-built compiler. 
I'd suggest selecting a good compiler as build compiler (preferably a released
one) and sticking to it, the mainline is too moving a target for this.


[Bug debug/46704] [4.6 Regression] Ada compiler fails to build itself

2011-01-11 Thread gnugcc at marino dot st
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46704

John Marino  changed:

   What|Removed |Added

 CC||gnugcc at marino dot st

--- Comment #12 from John Marino  2011-01-12 07:27:40 
UTC ---
I'm now seeing this on NetBSD AMD64.  I always used --disable-bootstrap and
never saw it, but when I removed that configuration option I'm getting the
exact error.  This is with gcc build on 5 Jan 2011 and a source snapshot of 9
Jan.

I can't confirm the same on NetBSD32 because when I remove --disable-bootstrap
libiberty can't compile during the first stage (bad assembly, thinks %sil
register is selected which doesn't exist on x86)

It looks like the fix came after the first gcc was built, so I should rebuild
it with Jan 9 snapshot using --disable-bootstrap, install it, and then rebuild
it again with disable snapshot?

Thanks,
John


Using built-in specs.
COLLECT_GCC=gnatgcc
COLLECT_LTO_WRAPPER=/usr/pkg/libexec/gcc/x86_64-aux-netbsd5.1_RC4/4.6.0/lto-wrapper
Target: x86_64-aux-netbsd5.1_RC4
Configured with: /usr/pkgsrc/lang/gnat-aux/work/gcc-4.6-20110104/configure
--enable-languages=c,ada --build=x86_64-aux-netbsd5.1_RC4 --program-prefix=gnat
--prefix=/usr/pkg --with-system-zlib --with-gmp=/usr/pkg --with-mpfr=/usr/pkg
--with-mpc=/usr/pkg --with-libiconv-prefix=/usr/pkg --enable-shared
--enable-threads=posix --disable-bootstrap --disable-libgomp --disable-libssp
--disable-nls
Thread model: posix
gcc version 4.6.0 20110105 (experimental) -=> GNAT AUX [NetBSD64] (GCC)


[Bug tree-optimization/46535] [4.6 Regression] Endless loop during inlining

2011-01-11 Thread aoliva at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46535

Alexandre Oliva  changed:

   What|Removed |Added

 Resolution|WORKSFORME  |FIXED

--- Comment #7 from Alexandre Oliva  2011-01-12 
05:03:37 UTC ---
This was fixed by revision 168271.  If we fail to bring in the vtbl ptr
assignment from the cleanup stmt into the constexpr ctor, the inliner gets
thoroughly confused as expectations as to indirect calls are unmet.  I couldn't
determine exactly why the inliner ends up thinking it inlined a function into
itself, but I've already spend enough time getting acquainted with constexprs
and the cgraph inliner for now, and the fix is definitely good, so I'll leave
it at that.


[Bug lto/47264] New: [4.6 Regression] Many tests fail with -flto due unaligned load in lto-plugin.c

2011-01-11 Thread danglin at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47264

   Summary: [4.6 Regression] Many tests fail with -flto due
unaligned load in lto-plugin.c
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: dang...@gcc.gnu.org
  Host: hppa-unknown-linux-gnu
Target: hppa-unknown-linux-gnu
 Build: hppa-unknown-linux-gnu


FAIL: gcc.c-torture/execute/builtins/20010124-1.c compilation,  -O2 -flto
-flto-
partition=none 
FAIL: gcc.c-torture/execute/builtins/20010124-1.c compilation,  -O2 -flto 
FAIL: gcc.c-torture/execute/builtins/abs-1.c compilation,  -O2 -flto
-flto-parti
tion=none 
FAIL: gcc.c-torture/execute/builtins/abs-1.c compilation,  -O2 -flto 
FAIL: gcc.c-torture/execute/builtins/abs-2.c compilation,  -O2 -flto
-flto-parti
tion=none 
FAIL: gcc.c-torture/execute/builtins/abs-2.c compilation,  -O2 -flto 
FAIL: gcc.c-torture/execute/builtins/abs-3.c compilation,  -O2 -flto
-flto-parti
tion=none 
FAIL: gcc.c-torture/execute/builtins/abs-3.c compilation,  -O2 -flto 
FAIL: gcc.c-torture/execute/builtins/complex-1.c compilation,  -O2 -flto
-flto-p
artition=none 
FAIL: gcc.c-torture/execute/builtins/complex-1.c compilation,  -O2 -flto 
FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation,  -O2 -flto
-flto-par
tition=none 
FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation,  -O2 -flto 
FAIL: gcc.c-torture/execute/builtins/fputs.c compilation,  -O2 -flto
-flto-parti
tion=none 
FAIL: gcc.c-torture/execute/builtins/fputs.c compilation,  -O2 -flto 
FAIL: gcc.c-torture/execute/builtins/memchr.c compilation,  -O2 -flto
-flto-part
ition=none 
...

Executing on host: /home2/dave/gcc-4.6/objdir/gcc/xgcc
-B/home2/dave/gcc-4.6/obj
dir/gcc/
/home2/dave/gcc-4.6/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/20
010124-1.c
/home2/dave/gcc-4.6/gcc/gcc/testsuite/gcc.c-torture/execute/builtins/
20010124-1-lib.c
/home2/dave/gcc-4.6/gcc/gcc/testsuite/gcc.c-torture/execute/bui
ltins/lib/main.c  -w  -O2 -flto -flto-partition=none   -lm   -o
/home2/dave/gcc-
4.6/objdir/gcc/testsuite/gcc/20010124-1.x6(timeout = 300)
collect2: ld terminated with signal 10 [Bus error], core dumped
compiler exited with status 1
output is:
collect2: ld terminated with signal 10 [Bus error], core dumped

FAIL: gcc.c-torture/execute/builtins/20010124-1.c compilation,  -O2 -flto
-flto-
partition=none 

d...@gsyprf11:~/gcc-4.6/objdir/gcc/testsuite/gcc$ gdb -c core.save
/home2/dave/opt/gnu/bin/ld
GNU gdb (GDB) 7.2.50.20101119-cvs
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "hppa-linux".
For bug reporting instructions, please see:
...
Reading symbols from /home2/dave/opt/gnu/bin/ld...done.
BFD: Warning: /home2/dave/gcc-4.6/objdir/gcc/testsuite/gcc/core.save is
truncated: expected core file size >= 1998848, found: 1871872.
[New LWP 29059]
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/ld.so.1
Reading symbols from /home2/dave/gcc-4.6/objdir/gcc/liblto_plugin.so...done.
Loaded symbols for /home2/dave/gcc-4.6/objdir/gcc/liblto_plugin.so
Core was generated by `/home2/dave/opt/gnu/bin/ld -plugin
/home2/dave/gcc-4.6/objdir/gcc/liblto_plugin'.
Program terminated with signal 10, Bus error.
#0  parse_table_entry (entry=0x122c28, p=, 
aux=) at ../../gcc/lto-plugin/lto-plugin.c:252
252  entry->size = *(uint64_t *) p;
(gdb) p/x $pc
$2 = 0x403df3d8
(gdb) disass 0x403df3c8,0x403df3e8
Dump of assembler code from 0x403df3c8 to 0x403df3e8:
   0x403df3c8 :ldw,s r5(r6),ret0
   0x403df3cc :stw ret0,-10(r9)
   0x403df3d0 :ldi -1,r20
   0x403df3d4 :copy r4,r19
=> 0x403df3d8 :ldw 3(r17),ret0
   0x403df3dc :ldw 7(r17),ret1
   0x403df3e0 :stw ret0,-c(r9)
   0x403df3e4 :stw ret1,-8(r9)
End of assembler dump.
(gdb) p/x $r17
$3 = 0x122b4c


[Bug target/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

Jack Howarth  changed:

   What|Removed |Added

  Attachment #22949|0   |1
is obsolete||

--- Comment #24 from Jack Howarth  2011-01-12 
03:28:39 UTC ---
Created attachment 22950
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22950
revised patch


[Bug c++/47263] New: [C++0x] lambda + dynamic-exception-specification std::unexpected() is not called.

2011-01-11 Thread flast at flast dot jp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47263

   Summary: [C++0x] lambda + dynamic-exception-specification
std::unexpected() is not called.
   Product: gcc
   Version: 4.5.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: fl...@flast.jp


In GCC4.5/4.6, if lambda throws unexpected exception, std::unexpected() is not
called but std::terminate() is called immidiately.

test code:
#include 
#include 
#include 
using namespace std;

int main( void )
{
set_unexpected( []{ puts( "unexpected" ); fflush( stdout ); throw 0; } );
set_terminate( []{ puts( "terminate" ); fflush( stdout ); abort(); } );
try
{
[]() throw( int ) { throw exception(); }();
}
catch( int )
{
puts( "catch" );
}
}

output:
$ ./a.out
terminate
zsh: abort  ./a.out


[Bug target/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread mikestump at comcast dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

--- Comment #23 from Mike Stump  2011-01-12 
00:46:43 UTC ---
Ok.


[Bug fortran/47260] DLLEXPORT attribute requires additional capabilities to be useful

2011-01-11 Thread kargl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47260

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org 2011-01-12 00:17:23 UTC ---
I don't use windows, so this could be a red herring.

Have you tried adding -shared or -rdynamic or -fPIC
or -fpic or some combination thereof?

While fort...@gnu is normally a developer mailing list,
I think you may find a solution to your problem if
you post there.


[Bug middle-end/42371] dead code not eliminated during folding with whole-program

2011-01-11 Thread matt at use dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42371

--- Comment #7 from Matt Hargett  2011-01-11 23:44:22 UTC 
---
Is the last remaining issue with this test case fixed by the patch for PR46076?


[Bug objc/47262] New: Better error message upon finding a @property in the instance variable list

2011-01-11 Thread nicola at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47262

   Summary: Better error message upon finding a @property in the
instance variable list
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: objc
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: nic...@gcc.gnu.org


The following error is probably fairly common --

/* Contributed by Nicola Pero , December 2010.
 */
/* { dg-do compile } */

@interface A
{
  @property int x;
}
@end

it would be nice to print a nice, friendly error message (to be defined, but
something explaining that @property should go with the methods, not instance
variables).  At the moment we print

testcase.m:6:3: error: expected specifier-qualifier-list before ‘property’

which doesn't tell an unexperienced user anything other than there is a syntax
error in the code. ;-)

Thanks


[Bug objc++/47261] ICE on @property declaration in the wrong place

2011-01-11 Thread nicola at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47261

Nicola Pero  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.01.11 23:17:30
 Ever Confirmed|0   |1

--- Comment #1 from Nicola Pero  2011-01-11 23:17:30 
UTC ---
Confirmed with GCC trunk (4.6) on 11 January 2011.

Thanks


[Bug objc++/47261] New: ICE on @property declaration in the wrong place

2011-01-11 Thread nicola at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47261

   Summary: ICE on @property declaration in the wrong place
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: objc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: nic...@gcc.gnu.org


The following testcase crashes the ObjC++ compiler (it works with the ObjC one)

/* Contributed by Nicola Pero , December 2010.
 */
/* { dg-do compile } */

@interface A
{
  @property int x;
}
@end

Thanks


[Bug tree-optimization/47239] [4.6 Regression] (int)&func & 3 is always optimized to 0 on some targets

2011-01-11 Thread kkojima at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47239

--- Comment #3 from Kazumoto Kojima  2011-01-11 
23:14:45 UTC ---
I've tried 168661 with arm, hppa and sh64 cc1's. The problem
has gone away on all these 3 targets.  Thanks!


[Bug fortran/47260] DLLEXPORT attribute requires additional capabilities to be useful

2011-01-11 Thread craig.powers at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47260

--- Comment #1 from Craig Powers  2011-01-11 
23:12:55 UTC ---
I've also tried using dlltool and a .def file to coerce my procedure into being
exported, with no luck.  Does gfortran not support exporting a function?


[Bug fortran/47240] [F03] segfault with procedure pointer component

2011-01-11 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47240

--- Comment #8 from Dominique d'Humieres  2011-01-11 
21:38:46 UTC ---
(In reply to comment #7)
> > ...
> > ... this produces loads of regressions.
>
> ... but the following variant doesn't:
> ...

Confirmed, however the following code


[macbook] f90/bug% cat pr35971_red.f90
module other_fun
   use ISO_C_BINDING
   implicit none
   private
! Message to be returned by procedure pointed to
! by the C_FUNPTR
   character, allocatable, save :: my_message(:)
! Interface block for the procedure pointed to
! by the C_FUNPTR
   public abstract_fun
   abstract interface
  function abstract_fun(x)
 use ISO_C_BINDING
 import my_message
 implicit none
 integer(C_INT) x(:)
 character(size(my_message),C_CHAR) abstract_fun(size(x))
  end function abstract_fun
   end interface
   contains
! Procedure to store the message and get the C_FUNPTR
  function gp(message) bind(C,name='BlAh')
! procedure(abstract_fun) make_mess
 character(kind=C_CHAR) message(*)
 type(C_FUNPTR) gp
 integer(C_INT64_T) i

 i = 1
 do while(message(i) /= C_NULL_CHAR)
i = i+1
 end do
 my_message = message(int(1,kind(i)):i-1)
 gp = get_funloc(make_mess,aux)
! gp = aux(make_mess)
  end function gp

! Intermediate procedure to pass the function and get
! back the C_FUNPTR
  function get_funloc(x,y)
 procedure(abstract_fun) x
 type(C_FUNPTR) y
 external y
 type(C_FUNPTR) get_funloc

 get_funloc = y(x)
  end function get_funloc

! Procedure to convert the function to C_FUNPTR
  function aux(x)
 interface
subroutine x() bind(C)
end subroutine x
 end interface
 type(C_FUNPTR) aux

 aux = C_FUNLOC(x)
  end function aux

! Procedure pointed to by the C_FUNPTR
  function make_mess(x)
 integer(C_INT) x(:)
 character(size(my_message),C_CHAR) make_mess(size(x))

 make_mess = transfer(my_message,make_mess(1))
  end function make_mess
end module other_fun
end

gives at -O2 and above

[macbook] f90/bug% gfc -O2 pr35971_red.f90
pr35971_red.f90: In function 'gp':
pr35971_red.f90:67:0: error: non-trivial conversion at assignment
void (*) (void)
void (*) (struct array1_unknown &, integer(kind=4), struct
array1_integer(kind=4) & restrict)
__result_gp_72 = make_mess;

pr35971_red.f90:67:0: internal compiler error: verify_stmts failed


[Bug debug/46955] Missing DW_AT_const_value from DW_TAG_template_value_parameter

2011-01-11 Thread dodji at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46955

Dodji Seketeli  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #3 from Dodji Seketeli  2011-01-11 
21:24:07 UTC ---
Fixed in trunk (4.6).


[Bug debug/46955] Missing DW_AT_const_value from DW_TAG_template_value_parameter

2011-01-11 Thread dodji at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46955

--- Comment #2 from Dodji Seketeli  2011-01-11 
21:20:13 UTC ---
Author: dodji
Date: Tue Jan 11 21:20:07 2011
New Revision: 168681

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168681
Log:
Fix PR debug/46955

gcc/cp/

* cp-lang.c (get_template_innermost_arguments_folded)
(get_template_argument_pack_elems_folded)
(template_arg_needs_folding, fold_cplus_constants): New static
functions.
(LANG_HOOKS_GET_INNERMOST_GENERIC_ARGS): Set this hook to
get_template_innermost_arguments_folded.
(LANG_HOOKS_GET_ARGUMENT_PACK_ELEMS): Set this hook to
get_template_argument_pack_elems_folded.

gcc/testsuite/

* g++.dg/debug/dwarf2/template-params-8.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/debug/dwarf2/template-params-8.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-lang.c
trunk/gcc/testsuite/ChangeLog


[Bug fortran/47260] New: DLLEXPORT attribute requires additional capabilities to be useful

2011-01-11 Thread craig.powers at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47260

   Summary: DLLEXPORT attribute requires additional capabilities
to be useful
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: craig.pow...@gmail.com


With the following mingw gfortran package:
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=c:/program
files/gfortran/bin/../libexec/gcc/i586-pc-mingw32
/4.6.0/lto-wrapper.exe
Target: i586-pc-mingw32
Configured with: ../gcc-trunk/configure --prefix=/mingw
--enable-languages=c,for
tran --with-gmp=/home/brad/gfortran/dependencies --disable-werror
--enable-threa
ds --disable-nls --build=i586-pc-mingw32 --enable-libgomp --disable-shared
--dis
able-win32-registry --with-dwarf2 --disable-sjlj-exceptions --enable-lto
Thread model: win32
gcc version 4.6.0 20101201 (experimental) [trunk revision 167359] (GCC)


If I build a standalone function declared as:
INTEGER FUNCTION test()
!GCC$ ATTRIBUTES STDCALL, DLLEXPORT :: test

test = 1

END FUNCTION test

and build it with:
gfortran -std=f2008 -march=native -c bug.f90

The result is:
bug.f90:1:0: error: external linkage required for symbol 'test' because of
'dlle
xport' attribute


I believe that either something is not being set correctly for symbol 'test',
or an additional attribute needs to be made available so that 'test' can be
marked correctly.  In the absence of this, the manual should clearly state that
dllexport cannot be applied to procedures in Windows.


[Bug target/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

--- Comment #22 from Jack Howarth  2011-01-11 
19:32:25 UTC ---
Created attachment 22949
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22949
proposed patch


[Bug lto/47259] LTO and global register variable

2011-01-11 Thread d.g.gorbachev at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259

--- Comment #1 from Dmitry Gorbachev  
2011-01-11 18:47:49 UTC ---
Created attachment 22948
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22948
Backtrace


[Bug lto/47259] New: LTO and global register variable

2011-01-11 Thread d.g.gorbachev at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47259

   Summary: LTO and global register variable
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: d.g.gorbac...@gmail.com


Created attachment 22947
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22947
Testcase

internal compiler error: in expand_expr_addr_expr_1, at expr.c:6917


[Bug c/47255] Missed optimization with loops, inline functions, and __attribute__((const))

2011-01-11 Thread in-gnu at baka dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47255

--- Comment #2 from Seth Robertson  2011-01-11 18:40:36 
UTC ---
Created attachment 22946
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22946
Revised test program exhibiting missed optimization

Well, my point is that even if I remove the obvious side-effect, gcc cannot
take advantage of the knowledge I am providing it.  If instead of a printf() I
make a system call which will return a (what I know/guarantee is, but is not
declared as, a) ((const)) value (like getgid(), getuid(), or geteuid()) and use
it in the expression, it is likewise not optimized.  I'm attaching a second
test program using these system calls.  Test with `strace ./x 2>&1 | grep get |
wc -l`.  When you compile w/`gcc -O2` you should get the number 12.  When you
compile w/`gcc -O3` or with "-finline-functions -finline-small-functions", you
get 21 (ie. it did more work than necessary).  Of course without any
optimization you get the maximum of 30.

I am perfectly willing to believe that inlining happens first and throws away
the information such that it will miss the opportunity to CSE.  I also believe
that if gcc could intuit that it was const (e.g. pure multiplication
operations) that it wouldn't duplicate the work. I'm just saying this is a
missed optimization.

There could be a dup bug somewhere, but none of the tickets with "pure" or
"const" and "__attributes__" subjects discuss it.  Nor "inline' and 'cse'.


[Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

--- Comment #21 from Jack Howarth  2011-01-11 
18:06:31 UTC ---
This brute force approach works for both a standard and lto-bootstrap...

Index: gcc/config/darwin.c
===
--- gcc/config/darwin.c(revision 168667)
+++ gcc/config/darwin.c(working copy)
@@ -2615,10 +2615,23 @@ darwin_override_options (void)
   darwin_emit_branch_islands = true;
 }

+  if (flag_gtoggle)
+{
+  if (debug_info_level == DINFO_LEVEL_NONE)
+{
+  debug_info_level = DINFO_LEVEL_NORMAL;
+
+  if (write_symbols == NO_DEBUG)
+write_symbols = PREFERRED_DEBUGGING_TYPE;
+}
+  else
+debug_info_level = DINFO_LEVEL_NONE;
+}
+
   if (flag_var_tracking
-  && (generating_for_darwin_version >= 9)
+  && generating_for_darwin_version >= 9
   && debug_info_level >= DINFO_LEVEL_NORMAL
-  && debug_hooks->var_location != do_nothing_debug_hooks.var_location)
+  && write_symbols == DWARF2_DEBUG)
 flag_var_tracking_uninit = 1;

   if (MACHO_DYNAMIC_NO_PIC_P)


[Bug middle-end/31528] Inlining with -Os increases code size

2011-01-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31528

Jan Hubicka  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #12 from Jan Hubicka  2011-01-11 
17:58:21 UTC ---
OK, fixed;The other problem is already tracked in bug #30908


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-11 Thread ibolton at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #10 from Ian Bolton  2011-01-11 
17:42:52 UTC ---
(In reply to comment #9)
> Created attachment 22945 [details]
> Test patch
> 
> Could you try the following? It's a variant of a patch Richard Sandiford
> recently posted.

Thanks for looking into this.

The patch has worked on gcc 4.5 for Ammp, but I still need to test Applu (which
is failing for current version of gcc 4.5 branch) and then Ammp on trunk.  I'll
get back to you.  It's looking promising though.


[Bug lto/45721] [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:673 with -flto

2011-01-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45721

Jan Hubicka  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #8 from Jan Hubicka  2011-01-11 
17:41:07 UTC ---
Fixed.


[Bug lto/45375] [meta-bug] Issues with building Mozilla with LTO

2011-01-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375

--- Comment #34 from Jan Hubicka  2011-01-11 
17:29:57 UTC ---
Author: hubicka
Date: Tue Jan 11 17:29:52 2011
New Revision: 168666

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168666
Log:

PR lto/45721
PR lto/45375
* tree.h (symbol_alias_set_t): Move typedef here from varasm.c
(symbol_alias_set_destroy, symbol_alias_set_contains,
propagate_aliases_backward): Declare.
* lto-streamer-out.c (struct sets): New sturcture.
(trivally_defined_alias): New function.
(output_alias_pair_p): Rewrite.
(output_unreferenced_globals): Fix output of alias pairs.
(produce_symtab): Likewise.
* ipa.c (function_and_variable_visibility): Set weak alias destination
as needed in lto.
* varasm.c (symbol_alias_set_t): Remove.
(symbol_alias_set_destroy): Export.
(propagate_aliases_forward, propagate_aliases_backward): New functions
based on ...
(compute_visible_aliases): ... this one; remove.
(trivially_visible_alias): New
(trivially_defined_alias): New.
(remove_unreachable_alias_pairs): Rewrite.
(finish_aliases_1): Reorganize code checking if alias is defined.
* passes.c (rest_of_decl_compilation): Do not call assemble_alias when
in LTO mode.

* lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs are
not partitioned.

* testsuite/gcc.dg/lto/pr45721_1.c: New file.
* testsuite/gcc.dg/lto/pr45721_0.c: New file.

Added:
trunk/gcc/testsuite/gcc.dg/lto/pr45721_0.c
trunk/gcc/testsuite/gcc.dg/lto/pr45721_1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lto-streamer-out.c
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto.c
trunk/gcc/passes.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.h
trunk/gcc/varasm.c


[Bug lto/45721] [4.6 Regression] ICE: in function_and_variable_visibility, at ipa.c:673 with -flto

2011-01-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45721

--- Comment #7 from Jan Hubicka  2011-01-11 
17:29:57 UTC ---
Author: hubicka
Date: Tue Jan 11 17:29:52 2011
New Revision: 168666

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168666
Log:

PR lto/45721
PR lto/45375
* tree.h (symbol_alias_set_t): Move typedef here from varasm.c
(symbol_alias_set_destroy, symbol_alias_set_contains,
propagate_aliases_backward): Declare.
* lto-streamer-out.c (struct sets): New sturcture.
(trivally_defined_alias): New function.
(output_alias_pair_p): Rewrite.
(output_unreferenced_globals): Fix output of alias pairs.
(produce_symtab): Likewise.
* ipa.c (function_and_variable_visibility): Set weak alias destination
as needed in lto.
* varasm.c (symbol_alias_set_t): Remove.
(symbol_alias_set_destroy): Export.
(propagate_aliases_forward, propagate_aliases_backward): New functions
based on ...
(compute_visible_aliases): ... this one; remove.
(trivially_visible_alias): New
(trivially_defined_alias): New.
(remove_unreachable_alias_pairs): Rewrite.
(finish_aliases_1): Reorganize code checking if alias is defined.
* passes.c (rest_of_decl_compilation): Do not call assemble_alias when
in LTO mode.

* lto.c (partition_cgraph_node_p, partition_varpool_node_p): Weakrefs are
not partitioned.

* testsuite/gcc.dg/lto/pr45721_1.c: New file.
* testsuite/gcc.dg/lto/pr45721_0.c: New file.

Added:
trunk/gcc/testsuite/gcc.dg/lto/pr45721_0.c
trunk/gcc/testsuite/gcc.dg/lto/pr45721_1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/lto-streamer-out.c
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto.c
trunk/gcc/passes.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.h
trunk/gcc/varasm.c


[Bug c/46076] [4.6 regression] constant propagation and compile-time math no longer happening versus 4.4 and 4.5

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46076

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #20 from Richard Guenther  2011-01-11 
17:02:05 UTC ---
Fixed.


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-11 Thread bernds at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #9 from Bernd Schmidt  2011-01-11 
17:02:40 UTC ---
Created attachment 22945
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22945
Test patch

Could you try the following? It's a variant of a patch Richard Sandiford
recently posted.


[Bug c/46076] [4.6 regression] constant propagation and compile-time math no longer happening versus 4.4 and 4.5

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46076

--- Comment #19 from Richard Guenther  2011-01-11 
17:01:45 UTC ---
Author: rguenth
Date: Tue Jan 11 17:01:37 2011
New Revision: 168665

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168665
Log:
2011-01-11  Richard Guenther  

PR tree-optimization/46076
* tree-ssa.c (useless_type_conversion_p): Conversions from
unprototyped to empty argument list function types are useless.

* gcc.dg/tree-ssa/pr46076.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr46076.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa.c


[Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

--- Comment #20 from Jan Hubicka  2011-01-11 16:56:35 
UTC ---
> Why not retain the original code behavior unless generating lto? The patch
Because the original code bahviour is wrong.  It assumes that debug_hooks is
initialized
while it is not at the point.

Honza
> below works with both a standard and lto-bootstrap on x86_64-apple-darwin10.
> 
> Index: gcc/config/darwin.c
> ===
> --- gcc/config/darwin.c(revision 168662)
> +++ gcc/config/darwin.c(working copy)
> @@ -2618,7 +2618,8 @@
>if (flag_var_tracking
>&& (generating_for_darwin_version >= 9)
>&& debug_info_level >= DINFO_LEVEL_NORMAL
> -  && debug_hooks->var_location != do_nothing_debug_hooks.var_location)
> +  && (flag_generate_lto ? (write_symbols == DWARF2_DEBUG)
> +  : (debug_hooks->var_location != do_nothing_debug_hooks.var_location)))
>  flag_var_tracking_uninit = 1;
> 
>if (MACHO_DYNAMIC_NO_PIC_P)


Re: [Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread Jan Hubicka
> Why not retain the original code behavior unless generating lto? The patch
Because the original code bahviour is wrong.  It assumes that debug_hooks is 
initialized
while it is not at the point.

Honza
> below works with both a standard and lto-bootstrap on x86_64-apple-darwin10.
> 
> Index: gcc/config/darwin.c
> ===
> --- gcc/config/darwin.c(revision 168662)
> +++ gcc/config/darwin.c(working copy)
> @@ -2618,7 +2618,8 @@
>if (flag_var_tracking
>&& (generating_for_darwin_version >= 9)
>&& debug_info_level >= DINFO_LEVEL_NORMAL
> -  && debug_hooks->var_location != do_nothing_debug_hooks.var_location)
> +  && (flag_generate_lto ? (write_symbols == DWARF2_DEBUG)
> +  : (debug_hooks->var_location != do_nothing_debug_hooks.var_location)))
>  flag_var_tracking_uninit = 1;
> 
>if (MACHO_DYNAMIC_NO_PIC_P)


[Bug lto/44951] debug info ICE in whopr build due to missing -g at compile time.

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44951

Richard Guenther  changed:

   What|Removed |Added

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

--- Comment #7 from Richard Guenther  2011-01-11 
16:55:37 UTC ---
Assuming fixed.


[Bug libstdc++/43863] Unused recursive_init_error class defined with -fno-exceptions

2011-01-11 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43863

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|--- |4.6.0

--- Comment #7 from Jonathan Wakely  2011-01-11 
16:54:05 UTC ---
I'll get this done asap ...


[Bug bootstrap/47147] gcc 4.6 fails to compile on NetBSD

2011-01-11 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47147

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |WAITING
Version|unknown |4.6.0

--- Comment #4 from Jonathan Wakely  2011-01-11 
16:52:56 UTC ---
Still waiting for feedback

I'll investigate this myself (to expedite PR 47045) if there's a public NetBSD
machine available in a compile farm somewhere, or if someone is able to give me
ssh access to a box


[Bug libstdc++/43852] Embedded systems friendly libstdc++

2011-01-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43852

--- Comment #15 from Paolo Carlini  2011-01-11 
16:48:38 UTC ---
Of course no objections, I just couldn't figure out what we were up to.


[Bug libstdc++/47045] NetBSD: define changes in ctype.h

2011-01-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47045

Paolo Carlini  changed:

   What|Removed |Added

 CC||paolo.carlini at oracle dot
   ||com

--- Comment #7 from Paolo Carlini  2011-01-11 
16:46:31 UTC ---
Ah, I didn't know about 47147. Let's wait a bit more then.


[Bug driver/47244] [4.6 Regression] plugin linker is used unconditionally

2011-01-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47244

--- Comment #5 from Jan Hubicka  2011-01-11 
16:46:40 UTC ---
path posted. http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00654.html


[Bug libstdc++/43852] Embedded systems friendly libstdc++

2011-01-11 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43852

--- Comment #14 from Jonathan Wakely  2011-01-11 
16:41:56 UTC ---
If you have no objections I'll resolve PR 43863 for 4.6.0 (by putting
recurisve_init_error in a separate file) but I think this "quiet mode" needs a
bit more thought and time


[Bug libstdc++/43852] Embedded systems friendly libstdc++

2011-01-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43852

Paolo Carlini  changed:

   What|Removed |Added

 CC|jwakely.gcc at gmail dot|
   |com |

--- Comment #13 from Paolo Carlini  2011-01-11 
16:36:29 UTC ---
Jon, are we going to resolve this in time for 4.6.0?


[Bug rtl-optimization/47258] Extra instruction generated in 4.5.2

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258

--- Comment #4 from Richard Guenther  2011-01-11 
16:35:23 UTC ---
But we'll create bogus debug info for the typedef type decls then.


[Bug rtl-optimization/47258] Extra instruction generated in 4.5.2

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258

--- Comment #3 from Richard Guenther  2011-01-11 
16:34:40 UTC ---
(In reply to comment #2)
> After tried patches one-by-one, I believe the misoptimization is down to the
> following patch.

Which is a correctness patch.  You can try dumbing it down somewhat with

if (TYPE_MAIN_VARIANT (TREE_TYPE (root1)) != TYPE_MAIN_VARIANT (TREE_TYPE
(root2))
|| !types_compatible_p (TREE_TYPE (root1), TREE_TYPE (root2)))

and see if that helps.

> Index: tree-ssa-copyrename.c
> ===
> RCS file: /cvs/dev/tools/src/fp_gcc/gcc/tree-ssa-copyrename.c,v
> retrieving revision 1.1.2.5.2.1
> retrieving revision 1.1.2.5.2.2
> diff -u -r1.1.2.5.2.1 -r1.1.2.5.2.2
> --- tree-ssa-copyrename.c12 Apr 2010 13:15:43 -1.1.2.5.2.1
> +++ tree-ssa-copyrename.c13 Dec 2010 05:51:45 -1.1.2.5.2.2
> @@ -225,11 +225,11 @@
>ign2 = false;
>  }
> 
> -  /* Don't coalesce if the two variables aren't type compatible.  */
> -  if (!types_compatible_p (TREE_TYPE (root1), TREE_TYPE (root2)))
> +  /* Don't coalesce if the two variables are not of the same type.  */
> +  if (TREE_TYPE (root1) != TREE_TYPE (root2))
>  {
>if (debug)
> -fprintf (debug, " : Incompatible types.  No coalesce.\n");
> +fprintf (debug, " : Different types.  No coalesce.\n");
>return false;
>  }


[Bug libstdc++/47045] NetBSD: define changes in ctype.h

2011-01-11 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47045

--- Comment #6 from Jonathan Wakely  2011-01-11 
16:34:31 UTC ---
GCC 4.6.0 can't be built on NetBSD (PR 47147) so unless that gets fixed there's
no way to test the changes, and so I thought no urgency to fix this one

I'm happy to commit the changes untested if you want.

I tried to check the NetBSD CVS repo to find out if ctype.h includes
sys/param.h but I couldn't find the right files


[Bug libstdc++/45191] unqualified atomic access

2011-01-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45191

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #2 from Paolo Carlini  2011-01-11 
16:32:54 UTC ---
As far as I can see, this is fixed in mainline.


[Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

--- Comment #19 from Jack Howarth  2011-01-11 
16:32:00 UTC ---
Why not retain the original code behavior unless generating lto? The patch
below works with both a standard and lto-bootstrap on x86_64-apple-darwin10.

Index: gcc/config/darwin.c
===
--- gcc/config/darwin.c(revision 168662)
+++ gcc/config/darwin.c(working copy)
@@ -2618,7 +2618,8 @@
   if (flag_var_tracking
   && (generating_for_darwin_version >= 9)
   && debug_info_level >= DINFO_LEVEL_NORMAL
-  && debug_hooks->var_location != do_nothing_debug_hooks.var_location)
+  && (flag_generate_lto ? (write_symbols == DWARF2_DEBUG)
+  : (debug_hooks->var_location != do_nothing_debug_hooks.var_location)))
 flag_var_tracking_uninit = 1;

   if (MACHO_DYNAMIC_NO_PIC_P)


[Bug libstdc++/47045] NetBSD: define changes in ctype.h

2011-01-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47045

--- Comment #5 from Paolo Carlini  2011-01-11 
16:27:28 UTC ---
Are we still waiting for feedback? PS: IMHO, if just  is ok instead of
, it would be much nicer. Besides that nit, it would be nice to
have the tweak in 4.6.0, if we can make it...


[Bug rtl-optimization/47258] Extra instruction generated in 4.5.2

2011-01-11 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258

--- Comment #2 from Bingfeng Mei  2011-01-11 16:16:28 
UTC ---
After tried patches one-by-one, I believe the misoptimization is down to the
following patch.

Index: tree-ssa-copyrename.c
===
RCS file: /cvs/dev/tools/src/fp_gcc/gcc/tree-ssa-copyrename.c,v
retrieving revision 1.1.2.5.2.1
retrieving revision 1.1.2.5.2.2
diff -u -r1.1.2.5.2.1 -r1.1.2.5.2.2
--- tree-ssa-copyrename.c12 Apr 2010 13:15:43 -1.1.2.5.2.1
+++ tree-ssa-copyrename.c13 Dec 2010 05:51:45 -1.1.2.5.2.2
@@ -225,11 +225,11 @@
   ign2 = false;
 }

-  /* Don't coalesce if the two variables aren't type compatible.  */
-  if (!types_compatible_p (TREE_TYPE (root1), TREE_TYPE (root2)))
+  /* Don't coalesce if the two variables are not of the same type.  */
+  if (TREE_TYPE (root1) != TREE_TYPE (root2))
 {
   if (debug)
-fprintf (debug, " : Incompatible types.  No coalesce.\n");
+fprintf (debug, " : Different types.  No coalesce.\n");
   return false;
 }


[Bug c/46076] [4.6 regression] constant propagation and compile-time math no longer happening versus 4.4 and 4.5

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46076

Richard Guenther  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org
   |gnu.org |

--- Comment #18 from Richard Guenther  2011-01-11 
15:52:48 UTC ---
Mine then.


[Bug rtl-optimization/47166] [4.5/4.6 Regression] SpecCpu2000 Ammp segfaults for ARM with -O3 -mthumb

2011-01-11 Thread bernds at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47166

--- Comment #8 from Bernd Schmidt  2011-01-11 
15:45:34 UTC ---
I think the real problem here is that when reloading autoincs, we somehow end
up with 

(gdb) p spill_reg_store[3]
$42 = (rtx) 0xf7a1118c
(gdb) pr
(insn 3163 3161 3164 99 rectmm.c:1041 (set (reg:SI 1 r1)
(plus:SI (reg:SI 1 r1)
(const_int 280 [0x118]))) 4 {*arm_addsi3} (nil))

which doesn't set R3 at all - insn 3164 does.


[Bug c++/45520] [4.6 Regression] [C++0x] compiler segmentation fault on decltype in lambda-declarator

2011-01-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45520

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #6 from Paolo Carlini  2011-01-11 
15:45:00 UTC ---
Fixed.


[Bug c++/46658] [4.6 Regression] internal compiler error on cp/init.c

2011-01-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46658

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #12 from Paolo Carlini  2011-01-11 
15:44:07 UTC ---
Thus fixed, I suppose.


[Bug c++/47242] [C++0x] ICE: tree check: expected field_decl, have error_mark in build_lambda_object, at cp/semantics.c:7604 on invalid lambda function

2011-01-11 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47242

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.01.11 15:42:30
 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot
   |gnu.org |com
 Ever Confirmed|0   |1

--- Comment #1 from Paolo Carlini  2011-01-11 
15:42:30 UTC ---
Seems easy.


[Bug rtl-optimization/45235] const volatile read moved out of order

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45235

Richard Guenther  changed:

   What|Removed |Added

  Known to work||4.6.0

--- Comment #8 from Richard Guenther  2011-01-11 
15:42:12 UTC ---
Fixed on trunk sofar.


[Bug rtl-optimization/45235] const volatile read moved out of order

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45235

--- Comment #7 from Richard Guenther  2011-01-11 
15:41:23 UTC ---
Author: rguenth
Date: Tue Jan 11 15:41:17 2011
New Revision: 168663

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168663
Log:
2011-01-11  Richard Guenther  

PR middle-end/45235
* emit-rtl.c (set_mem_attributes_minus_bitpos): Do not mark
volatile MEMs as MEM_READONLY_P.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/emit-rtl.c


[Bug bootstrap/47215] [4.6 Regression] Failed to bootstrap

2011-01-11 Thread sch...@linux-m68k.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47215

Andreas Schwab  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #12 from Andreas Schwab  2011-01-11 15:30:24 
UTC ---
There are plenty.


[Bug c/46076] [4.6 regression] constant propagation and compile-time math no longer happening versus 4.4 and 4.5

2011-01-11 Thread joseph at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46076

--- Comment #17 from joseph at codesourcery dot com  2011-01-11 15:28:56 UTC ---
On Tue, 11 Jan 2011, rguenth at gcc dot gnu.org wrote:

> I don't think we should add hacks like that.  Either the type signatures
> are compatible for the middle-end (and exchanging one for the other does not
> affect generated code for any target) or not.  I can't answer this question.
> If they are indeed compatible then fixing the bug is easy.
> 
> Thus, can I call
> 
>  void foo();
> 
> via
> 
>  *(void (*)(void))&foo
> 
> and can I call
> 
>  void foo (void);
> 
> via
> 
>  *(void (*)())&foo
> 
> on all targets without unexpected effects (assuming foo does not use
> any arguments)?

Yes, those types are compatible and so this should work for all ABIs 
designed for C (which should mean all ABIs GCC handles).  An unprototyped 
function type is compatible with a prototyped one if the return types are 
compatible, the prototyped type is not variadic and the prototyped type 
does not have parameter types such as "char" that are changed under the 
default argument promotions.


[Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

--- Comment #18 from Jack Howarth  2011-01-11 
15:23:34 UTC ---
Both the patch in comment 16 and 17 produce the same errors in a standard
bootstrap...

../../gcc/libdecnumber/decContext.c:1:0: error: variable tracking requested,
but useless unless producing debug info [-Werror]
cc1: all warnings being treated as errors


[Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

--- Comment #17 from Jack Howarth  2011-01-11 
15:11:49 UTC ---
I assume you really meant...

 if (flag_var_tracking
 && (generating_for_darwin_version >= 9)
 && (flag_gtoggle ? (debug_info_level >= DINFO_LEVEL_NORMAL)
 : (debug_info_level == DINFO_LEVEL_NONE))
 && write_symbols == DWARF2_DEBUG)

without the extra...

&& debug_info_level >= DINFO_LEVEL_NORMAL


[Bug bootstrap/47215] [4.6 Regression] Failed to bootstrap

2011-01-11 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47215

Kai Tietz  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #11 from Kai Tietz  2011-01-11 14:55:23 
UTC ---
Fixed.

Hope there is no other missing type-node ...


[Bug bootstrap/47215] [4.6 Regression] Failed to bootstrap

2011-01-11 Thread ktietz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47215

--- Comment #10 from Kai Tietz  2011-01-11 14:51:17 
UTC ---
Author: ktietz
Date: Tue Jan 11 14:51:07 2011
New Revision: 168662

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168662
Log:
2011-01-11  Kai Tietz  

PR bootstrap/47215
* decl.c (java_init_decl_processing): Initialize
long_integer_type_node.


Modified:
trunk/gcc/java/ChangeLog
trunk/gcc/java/decl.c


[Bug fortran/47240] [F03] segfault with procedure pointer component

2011-01-11 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47240

--- Comment #7 from janus at gcc dot gnu.org 2011-01-11 14:43:52 UTC ---
(In reply to comment #5)
> > Index: gcc/fortran/resolve.c
> > ===
> > --- gcc/fortran/resolve.c(revision 168618)
> > +++ gcc/fortran/resolve.c(working copy)
> > @@ -4858,6 +4858,9 @@ expression_rank (gfc_expr *e)
> > 
> >for (ref = e->ref; ref; ref = ref->next)
> >  {
> > +  if (ref->type == REF_COMPONENT)
> > +rank = ref->u.c.component->as ? ref->u.c.component->as->rank : 0;
> > +
> >if (ref->type != REF_ARRAY)
> >  continue;
> 
> ... this produces loads of regressions.


... but the following variant doesn't:


Index: gcc/fortran/resolve.c
===
--- gcc/fortran/resolve.c(revision 168655)
+++ gcc/fortran/resolve.c(working copy)
@@ -4858,6 +4858,9 @@ expression_rank (gfc_expr *e)

   for (ref = e->ref; ref; ref = ref->next)
 {
+  if (ref->type == REF_COMPONENT && !ref->next)
+rank = ref->u.c.component->as ? ref->u.c.component->as->rank : 0;
+
   if (ref->type != REF_ARRAY)
 continue;


[Bug tree-optimization/47086] [4.5/4.6 Regression] ICE: verify_flow_info failed: BB 3 can not throw but has an EH edge with -O -fexceptions -fnon-call-exceptions -ftrapv

2011-01-11 Thread law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47086

--- Comment #7 from Jeffrey A. Law  2011-01-11 14:42:40 
UTC ---
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 01/11/11 07:22, zsojka at seznam dot cz wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47086
> 
> --- Comment #6 from Zdenek Sojka  2011-01-11 
> 14:21:49 UTC ---
> Thank you for fixing this.
> 
> It is not planned for backport to 4.5? Target Milestone set to 4.5.3 will 
> cause
> this bug to be shown as fixed in 4.5.3, which is not true.
> 
I wasn't planning to backport the fix; however, if you wish to do so and
ask the 4.5.x branch maintainer to include the fix it wouldn't be
terribly hard.

I fixed the target milestone.

Thanks,
Jeff
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJNLGxSAAoJEBRtltQi2kC7ISsIALIyXthTTNESWwlh2GqUsg9/
c2zFnrd4Ijvypwgq3pua9LE4UV+LFdGEW6zUHyi1FpcwXvXL+GcO06DVyjRn39sf
RdU0VRIknXMaPJbFjGzMHAvJQb2zfjGYxEfB6+qOPNtO+l4d5+YtIIwNQmUHRYxH
dTsSDzYZ1BXx6/64AJJrCXNKd+gmXvzxHiwc1qOgPYaks3a25i3LjK5YvLTwSAiT
xqtW/i8Atmupesvf43l2TRqiyCd62xcBkQW7kaKyNg+uZVm+agfvfW0v4Ln7MS8K
HUIvTkifh2KxqLnBMNeN4udws3QX0zkGM3Tsu5OXVeBU+ysE5JPXwAIY2kPYUmM=
=neNR
-END PGP SIGNATURE-


[Bug c/46076] [4.6 regression] constant propagation and compile-time math no longer happening versus 4.4 and 4.5

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46076

Richard Guenther  changed:

   What|Removed |Added

 CC||rth at gcc dot gnu.org

--- Comment #16 from Richard Guenther  2011-01-11 
14:32:23 UTC ---
I don't think we should add hacks like that.  Either the type signatures
are compatible for the middle-end (and exchanging one for the other does not
affect generated code for any target) or not.  I can't answer this question.
If they are indeed compatible then fixing the bug is easy.

Thus, can I call

 void foo();

via

 *(void (*)(void))&foo

and can I call

 void foo (void);

via

 *(void (*)())&foo

on all targets without unexpected effects (assuming foo does not use
any arguments)?


[Bug tree-optimization/47086] [4.5/4.6 Regression] ICE: verify_flow_info failed: BB 3 can not throw but has an EH edge with -O -fexceptions -fnon-call-exceptions -ftrapv

2011-01-11 Thread law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47086

Jeffrey A. Law  changed:

   What|Removed |Added

   Target Milestone|4.5.3   |4.6.0


[Bug tree-optimization/47239] [4.6 Regression] (int)&func & 3 is always optimized to 0 on some targets

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47239

--- Comment #2 from Richard Guenther  2011-01-11 
14:23:23 UTC ---
Author: rguenth
Date: Tue Jan 11 14:23:20 2011
New Revision: 168661

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168661
Log:
2011-01-11  Richard Guenther  

PR tree-optimization/47239
* tree-ssa-ccp.c (get_value_from_alignment): Punt for FUNCTION_DECLs.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-ccp.c


[Bug tree-optimization/47086] [4.5/4.6 Regression] ICE: verify_flow_info failed: BB 3 can not throw but has an EH edge with -O -fexceptions -fnon-call-exceptions -ftrapv

2011-01-11 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47086

--- Comment #6 from Zdenek Sojka  2011-01-11 14:21:49 
UTC ---
Thank you for fixing this.

It is not planned for backport to 4.5? Target Milestone set to 4.5.3 will cause
this bug to be shown as fixed in 4.5.3, which is not true.


[Bug fortran/47240] [F03] segfault with procedure pointer component

2011-01-11 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47240

--- Comment #6 from Dominique d'Humieres  2011-01-11 
14:21:26 UTC ---
> > Index: gcc/fortran/resolve.c
> > ...
> >  continue;
>
> ... this produces loads of regressions.

Confirmed;-(


[Bug tree-optimization/47087] [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -O -fexceptions -fnon-call-exceptions -ftrapv

2011-01-11 Thread law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47087

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||law at redhat dot com
 Resolution||DUPLICATE

--- Comment #3 from Jeffrey A. Law  2011-01-11 14:16:17 
UTC ---
Same root cause

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


[Bug tree-optimization/47086] [4.5/4.6 Regression] ICE: verify_flow_info failed: BB 3 can not throw but has an EH edge with -O -fexceptions -fnon-call-exceptions -ftrapv

2011-01-11 Thread law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47086

--- Comment #5 from Jeffrey A. Law  2011-01-11 14:16:18 
UTC ---
*** Bug 47087 has been marked as a duplicate of this bug. ***


[Bug tree-optimization/47086] [4.5/4.6 Regression] ICE: verify_flow_info failed: BB 3 can not throw but has an EH edge with -O -fexceptions -fnon-call-exceptions -ftrapv

2011-01-11 Thread law at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47086

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Jeffrey A. Law  2011-01-11 14:11:27 
UTC ---
Fixed on trunk


[Bug tree-optimization/47086] [4.5/4.6 Regression] ICE: verify_flow_info failed: BB 3 can not throw but has an EH edge with -O -fexceptions -fnon-call-exceptions -ftrapv

2011-01-11 Thread law at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47086

--- Comment #3 from Jeffrey A. Law  2011-01-11 14:10:58 
UTC ---
Author: law
Date: Tue Jan 11 14:10:54 2011
New Revision: 168659

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168659
Log:

* PR tree-optimization/47086
* tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Do not record
IVs from statements that might throw.

* PR tree-optimization/47086
* gcc.dg/pr47086.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/pr47086.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-loop-ivopts.c


[Bug rtl-optimization/47253] Conditional jump to tail function is not generated

2011-01-11 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47253

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.01.11 14:09:17
 Ever Confirmed|0   |1


[Bug driver/47244] [4.6 Regression] plugin linker is used unconditionally

2011-01-11 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47244

--- Comment #4 from Jan Hubicka  2011-01-11 14:08:41 UTC 
---
> Is pr39968 related (a duplicate) of this pr?
No, it is older than the problem and it is about plugins, not lto-plugin.
Perhaps plugins Make also needs to play the games with --enable-shared I added
into lto-plugin configury.

Honza


Re: [Bug driver/47244] [4.6 Regression] plugin linker is used unconditionally

2011-01-11 Thread Jan Hubicka
> Is pr39968 related (a duplicate) of this pr?
No, it is older than the problem and it is about plugins, not lto-plugin.
Perhaps plugins Make also needs to play the games with --enable-shared I added 
into lto-plugin configury.

Honza


[Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

--- Comment #16 from Jan Hubicka  2011-01-11 14:06:58 
UTC ---
> The patch will also be problematic for powerpc-apple-darwin9 and darwin8 since
> it relies on dwarf2 and those OS releases still use stabs.
It should not be problem.  For stabs we don't do var tracking.
The original test tested if target debug info supports var tracking and dwarf2
is the
only one. Since stabs support is not planned, I think the new test is as good
as old
one.

For that -gtoggle failure you need something like

 if (flag_var_tracking
 && (generating_for_darwin_version >= 9)
 && debug_info_level >= DINFO_LEVEL_NORMAL
 && (flag_gtoggle ? (debug_info_level >= DINFO_LEVEL_NORMAL)
 : (debug_info_level == DINFO_LEVEL_NONE))
 && write_symbols == DWARF2_DEBUG)

(i.e. -gtoggle is supposed to replace -g by -g0 and -g0 by -g.)

Honza


Re: [Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread Jan Hubicka
> The patch will also be problematic for powerpc-apple-darwin9 and darwin8 since
> it relies on dwarf2 and those OS releases still use stabs.
It should not be problem.  For stabs we don't do var tracking.
The original test tested if target debug info supports var tracking and dwarf2 
is the
only one. Since stabs support is not planned, I think the new test is as good 
as old
one.

For that -gtoggle failure you need something like

 if (flag_var_tracking
 && (generating_for_darwin_version >= 9)
 && debug_info_level >= DINFO_LEVEL_NORMAL
 && (flag_gtoggle ? (debug_info_level >= DINFO_LEVEL_NORMAL)
 : (debug_info_level == DINFO_LEVEL_NONE))
 && write_symbols == DWARF2_DEBUG)

(i.e. -gtoggle is supposed to replace -g by -g0 and -g0 by -g.)

Honza


[Bug driver/47244] [4.6 Regression] plugin linker is used unconditionally

2011-01-11 Thread dominiq at lps dot ens.fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47244

--- Comment #3 from Dominique d'Humieres  2011-01-11 
14:06:26 UTC ---
Is pr39968 related (a duplicate) of this pr?


[Bug rtl-optimization/47253] Conditional jump to tail function is not generated

2011-01-11 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47253

Zdenek Sojka  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #4 from Zdenek Sojka  2011-01-11 14:04:13 
UTC ---
(In reply to comment #3)
> jne only takes 8bit displacement.

There are two opcodes for jne - 0x75 taking 8bit displacement, and 0x0f 0x85
taking 16/32bit displacement:

(pasted from IA-32 Intel Architecture Software Developer’s Manual Volume 2:
Instruction Set Reference)

75 cb
JNE rel8
Jump short if not equal (ZF=0)

0F 85 cw/cd
JNE rel16/32
Jump near if not equal (ZF=0)


Jcc is no different from JMP, both can take 8/(16/)32bit displacement - even in
64bit mode.


[Bug driver/47244] [4.6 Regression] plugin linker is used unconditionally

2011-01-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47244

--- Comment #2 from Jan Hubicka  2011-01-11 
14:03:29 UTC ---
testing the following patch.
Index: gcc.c
===
--- gcc.c   (revision 168655)
+++ gcc.c   (working copy)
@@ -621,11 +621,18 @@
 # endif
 #endif

-/* Conditional to test whether plugin is used or not.  */
+/* Conditional to test whether plugin is used or not.
+   FIXME: For slim LTO we will need to enable plugin unconditionally.  This
+   still cause problems with PLUGIN_LD != LD and when plugin is built but
+   not useable.  For GCC 4.6 we don't support slim LTO and thus we can enable
+   plugin only when LTO is enabled.  We still honor explicit
+   -fuse-linker-plugin.  */
 #ifdef HAVE_LTO_PLUGIN
-#define PLUGIN_COND "!fno-use-linker-plugin"
+#define PLUGIN_COND "!fno-use-linker-plugin:%{flto|flto=*|fuse-linker-plugin"
+#define PLUGIN_COND_CLOSE "}"
 #else
 #define PLUGIN_COND "fuse-linker-plugin"
+#define PLUGIN_COND_CLOSE ""
 #endif


@@ -646,9 +653,9 @@
 -plugin-opt=%(lto_wrapper) \
 -plugin-opt=-fresolution=%u.res \
 %{!nostdlib:%{!nodefaultlibs:%:pass-through-libs(%(link_gcc_c_sequence))}}
\
-} \
-%{flto*:%

[Bug target/44217] GCC emits cmpxchg16b which Sun as cannot handle

2011-01-11 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44217

Rainer Orth  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.01.11 13:49:30
 Ever Confirmed|0   |1

--- Comment #2 from Rainer Orth  2011-01-11 13:49:30 UTC 
---
Looking further, there's certainly a compiler problem here.  In the assembler
output for ibgomp.c/atomic-2.c, I see

> grep cmpxchg atomic-2.s 
lock cmpxchgq   %rcx, d(%rip)
lock cmpxchg16b ld(%rip)

The first variant can be assembled correctly by Sun as, while the second
cannot.
It seems that GCC is buggy/inconsistent here: while Sun as knows about
cmpxchg8b,
it normally requires cmpxchg{b,w,l,q}, and definitely cannot handle cmpxchg16b.


[Bug bootstrap/46037] --enable-stage1-languages=c,lto --enable-languages=c,lto --with-build-config=bootstrap-lto fails on darwin

2011-01-11 Thread howarth at nitro dot med.uc.edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46037

--- Comment #15 from Jack Howarth  2011-01-11 
13:48:30 UTC ---
The regression testresults a lto-bootstrap of the proposed patch in Comment 10
on x86_64-apple-darwin10...

http://gcc.gnu.org/ml/gcc-testresults/2011-01/msg00899.html

The patch will also be problematic for powerpc-apple-darwin9 and darwin8 since
it relies on dwarf2 and those OS releases still use stabs.


[Bug rtl-optimization/47258] Extra instruction generated in 4.5.2

2011-01-11 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258

--- Comment #1 from Bingfeng Mei  2011-01-11 13:38:13 
UTC ---
Created attachment 22944
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22944
Preprocessed test case


[Bug rtl-optimization/47258] New: Extra instruction generated in 4.5.2

2011-01-11 Thread bmei at broadcom dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258

   Summary: Extra instruction generated in 4.5.2
   Product: gcc
   Version: 4.5.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: b...@broadcom.com


I encounter a performance regression in 4.5.2 (4.6 as well) compared with
4.5.1.

The code is from Core Mark. 

Compile the attached .i file. 

~/work/install-x86-452/bin/gcc core_matrix.i -O2 -S -o x86-452.s
...
.L5:
movl%r8d, %r10d
.L3:
mov%r9d, %r8d
movswl(%rcx,%rax), %r11d
addq$2, %rax
movswl(%rdx,%r8,2), %r8d
addl$1, %r9d
imull%r11d, %r8d
addl%r10d, %r8d
cmpq%rbx, %rax
jne.L5
...

~/work/install-x86-451/bin/gcc core_matrix.i -O2 -S -o x86-451.s
...
.L3:
mov%r9d, %r8d
movswl(%rcx,%rax), %r11d
addq$2, %rax
movswl(%rdx,%r8,2), %r8d
addl$1, %r9d
imull%r11d, %r8d
addl%r8d, %r10d
cmpq%rbx, %rax
jne.L3
...

The performance hit is even worse on our architecture because zero-overhead
loop instruction cannot be used in such irregular loop produced by 4.5.2

The configuration used is:
../gcc-4.5.1/configure
--prefix=/projects/firepath/tools/work/bmei/install-x86-451
--with-mpfr=/projects/firepath/tools/work/bmei/packages/mpfr/2.4.1/x86-64
--with-gmp=/projects/firepath/tools/work/bmei/packages/gmp/4.3.0/x86-64
--with-mpc=/projects/firepath/tools/work/bmei/packages/mpc/0.8.1/x86-64
--with-elf=/projects/firepath/tools/work/bmei/packages/libelf/x86-64
--disable-bootstrap --enable-languages=c --no-create --no-recursion


The difference between 4.5.1 and 4.5.2 seems to occur in RTL expand pass.


[Bug rtl-optimization/47253] Conditional jump to tail function is not generated

2011-01-11 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47253

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #3 from H.J. Lu  2011-01-11 13:35:10 
UTC ---
jne only takes 8bit displacement.


[Bug middle-end/46823] [4.6 Regression] ICE: edge points to wrong declaration

2011-01-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46823

--- Comment #17 from Jan Hubicka  2011-01-11 
13:29:58 UTC ---
I believed that we are supposed to update the statement first and only then try
to inline it. Otherwise we would get into problem with inliner not skipping the
args.

Anyway lookup based on call statement is good idea, but we need to resolve the
problem above.


[Bug lto/47225] [4.6 regression]: cross-compile fails while configuring libgcc with "xgcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found"

2011-01-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47225

--- Comment #13 from Jan Hubicka  2011-01-11 
13:27:54 UTC ---
Even when we do not default to -flinker-plugin w/o LTO this remains a problem.
We should chase out cases where we build plugin but it is useless.


[Bug driver/47244] [4.6 Regression] plugin linker is used unconditionally

2011-01-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47244

Jan Hubicka  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.01.11 13:26:42
 AssignedTo|unassigned at gcc dot   |hubicka at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from Jan Hubicka  2011-01-11 
13:26:42 UTC ---
This change was intentional.
We will need to use linker plugin unconditionally for slim LTO support, but per
discussion with Richard, we should switch to this only for next stage1 as slim
LTO is not getting into 4.6.0.

I guess we only need to update SPECs to test -flto, should be easy.


[Bug tree-optimization/46469] [4.6 Regression] ICE: verify_cgraph_node failed: inline clone is needed at -O

2011-01-11 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46469

Jan Hubicka  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #7 from Jan Hubicka  2011-01-11 
13:21:56 UTC ---
bah, really fixed ;)


[Bug tree-optimization/47087] [4.5/4.6 Regression] ICE: verify_stmts failed: statement marked for throw, but doesn't with -O -fexceptions -fnon-call-exceptions -ftrapv

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47087

Richard Guenther  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org
   |gnu.org |

--- Comment #2 from Richard Guenther  2011-01-11 
13:12:00 UTC ---
Mine.


[Bug bootstrap/47243] [4.6 Regression] Bootstrap fails: Segfault of genmddeps / COLLECT bug?

2011-01-11 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47243

--- Comment #6 from Jan Hubicka  2011-01-11 13:06:18 UTC 
---
> > If you want to use BFD linker for LTO plugin, you need the Linux binutils
> > 2.21.51.0.5. LTO plugin support in binutils-2.21 is incomplete.
> 
> I hope it will be fixed on the 2.21 branch.  Using linux binutils isn't
> possible.

I am using slightly pre 2.21 GNU LD and it works for me for bootstrap.
It has the TLS bug for Mozilla.  I think we should analyze the PR and
fill in binutils bug if it apply, but this looks more like a GCC bug.

Honza


[Bug lto/47222] [4.6 Regression] Revision 168593 failed many tests

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47222

Richard Guenther  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||FIXED

--- Comment #14 from Richard Guenther  2011-01-11 
13:05:11 UTC ---
Fixed.


[Bug lto/47225] [4.6 regression]: cross-compile fails while configuring libgcc with "xgcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found"

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47225

Richard Guenther  changed:

   What|Removed |Added

 CC||coolypf at qq dot com

--- Comment #12 from Richard Guenther  2011-01-11 
13:04:30 UTC ---
*** Bug 47223 has been marked as a duplicate of this bug. ***


[Bug plugins/47223] Fail to build gcc 4.6.0 (r168594) on mingw32

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47223

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||DUPLICATE

--- Comment #9 from Richard Guenther  2011-01-11 
13:04:30 UTC ---
dup

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


[Bug lto/47225] [4.6 regression]: cross-compile fails while configuring libgcc with "xgcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found"

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47225

Richard Guenther  changed:

   What|Removed |Added

   Priority|P3  |P1
   Target Milestone|--- |4.6.0
Summary|[4.6.0 regression]: |[4.6 regression]:
   |cross-compile fails while   |cross-compile fails while
   |configuring libgcc with |configuring libgcc with
   |"xgcc: fatal error: |"xgcc: fatal error:
   |-fuse-linker-plugin, but|-fuse-linker-plugin, but
   |liblto_plugin.so not found" |liblto_plugin.so not found"

--- Comment #11 from Richard Guenther  2011-01-11 
13:03:36 UTC ---
As said in another PR we should not add -fuse-linker-plugin to all command
lines.


[Bug lto/47221] Bugus warnings issued during lto bootstrap

2011-01-11 Thread hubicka at ucw dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47221

--- Comment #2 from Jan Hubicka  2011-01-11 13:03:00 UTC 
---
> we don't check for an error of inflateInit2 in which case state is
> not initialized.
Probably we should fix that, but still I don't think we should leak our well
engineered
MEM_REF gimple syntax into user warnings...

Honza


[Bug tree-optimization/47237] [4.3/4.4/4.5/4.6 Regression] builtin_apply_args broken WRT local API changes.

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47237

Richard Guenther  changed:

   What|Removed |Added

   Keywords||wrong-code
   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.01.11 12:59:31
   Target Milestone|--- |4.3.6
 Ever Confirmed|0   |1


[Bug tree-optimization/47239] [4.6 Regression] (int)&func & 3 is always optimized to 0 on some targets

2011-01-11 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47239

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.01.11 12:53:34
 AssignedTo|unassigned at gcc dot   |rguenth at gcc dot gnu.org
   |gnu.org |
   Target Milestone|--- |4.6.0
Summary|(int)&func & 3 is always|[4.6 Regression] (int)&func
   |optimized to 0 on some  |& 3 is always optimized to
   |targets |0 on some targets
 Ever Confirmed|0   |1

--- Comment #1 from Richard Guenther  2011-01-11 
12:53:34 UTC ---
Confirmed, mine.  The fix for PR35705 only extracts alignment information
from function decls for the single case &fn & 1.  That's odd.  I'm going
to simply punt for function-decls for now.


[Bug c++/47252] GCC Segfaults when boost/range.hpp is included and deduced parameter is a initializer_list

2011-01-11 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47252

--- Comment #2 from Jonathan Wakely  2011-01-11 
12:50:39 UTC ---
I think this has been fixed anyway, using Boost 1.42 it works with 4.5.2 and
4.6.0 - so you should probably report it to Ubuntu


[Bug c++/46871] [C++0x] ICE: in cxx_eval_constant_expression, at cp/semantics.c:6686 on invalid code (+rejects valid)

2011-01-11 Thread gcc at abeckmann dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46871

Andreas Beckmann  changed:

   What|Removed |Added

 CC||gcc at abeckmann dot de

--- Comment #1 from Andreas Beckmann  2011-01-11 
12:49:41 UTC ---
The following testcase (invalid code) results in the same ICE, but
unfortunately ICEs are difficult to compare, so this may be an independent
issue.

= 8< =
template < , , >
struct S ;
template < typename >
f ( ) {
const bool b = && ;
S < , b ,
= >8 =

$ g++-trunk -m64 -std=c++0x -pthread -O3 -c -o a.o PR46871-2.C
PR46871-2.C:1:12: error: expected identifier before ‘,’ token
PR46871-2.C:1:14: error: expected identifier before ‘,’ token
PR46871-2.C:1:16: error: expected identifier before ‘>’ token
PR46871-2.C:4:5: error: ISO C++ forbids declaration of ‘f’ with no type
[-fpermissive]
PR46871-2.C: In function ‘int f()’:
PR46871-2.C:5:20: error: expected identifier before ‘;’ token
PR46871-2.C:6:10: error: template argument 1 is invalid
PR46871-2.C:6:10: error: ‘(int)b’ is not a valid template argument for type
‘int’ because it is a non-constant expression
PR46871-2.C:6:10: error: the value of ‘b’ is not usable in a constant
expression
PR46871-2.C:6:10: internal compiler error: in cxx_eval_constant_expression, at
cp/semantics.c:6688
Please submit a full bug report,

gcc version 4.6.0 20110107 (experimental) (GCC)


  1   2   >