[Bug c/50521] -fstrict-volatile-bitfields is not strict

2011-09-26 Thread kikairoya at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50521

--- Comment #3 from Tomohiro Kashiwada  2011-09-27 
04:15:19 UTC ---
Other test case (gcc generates wrong code):

volatile union {
// add volatiles tenaciously, but...
volatile unsigned int all;
volatile struct {
volatile unsigned int a: 8;
volatile unsigned int : 7;
volatile unsigned int b: 1;
volatile unsigned int : 8;
volatile unsigned int c: 8;
} bits;
} bitfield;

int main() {
bitfield.bits.a = 1;
bitfield.bits.b = 1;
bitfield.bits.c = 1;
return 0;
}


$ gcc -S -O -o - btf.c -fstrict-volatile-bitfields
.file   "btf.c"
.text
.globl  main
.type   main, @function
main:
.LFB0:
.cfi_startproc
movl$1, bitfield(%rip) ;  breaks other area! 
movlbitfield(%rip), %eax
orb $128, %ah
movl%eax, bitfield(%rip)
movl$1, bitfield+3(%rip) ;  unaligned, and breaks other area!

movl$0, %eax
ret
.cfi_endproc
.LFE0:
.size   main, .-main
.comm   bitfield,4,4
.ident  "GCC: (Debian 4.6.1-3) 4.6.1"
.section.note.GNU-stack,"",@progbits



$ rx-elf-gcc -S -O -o - btf.c -fstrict-volatile-bitfields
.file   "btf.c"
.section P,"ax"
.global _main
.type   _main, @function
_main:
mov.L   #_bitfield, r14
mov.L   #1, [r14];  breaks other area! 
mov.L   [r14], r4
bset#15, r4
mov.L   r4, [r14]
mov.L   [r14], r4
and #0xff, r4
or  #0x100, r4
mov.L   r4, [r14]; ok, aligned (my misunderstanding).
mov.L   #0, r1
rts
.size   _main, .-_main
.comm   _bitfield,4,4
.ident  "GCC: (GNU) 4.6.1"


[Bug libstdc++/50529] [C++0x] std::vector::erase invokes undefined behavior with empty range

2011-09-26 Thread delong.j at fb dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50529

--- Comment #5 from Jordan DeLong  2011-09-27 02:56:14 
UTC ---
Nice.  Thanks!


[Bug libstdc++/50529] [C++0x] std::vector::erase invokes undefined behavior with empty range

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50529

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.7.0
   Severity|major   |normal

--- Comment #4 from Paolo Carlini  2011-09-27 
02:40:53 UTC ---
Done.


[Bug libstdc++/50529] [C++0x] std::vector::erase invokes undefined behavior with empty range

2011-09-26 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50529

--- Comment #3 from paolo at gcc dot gnu.org  
2011-09-27 02:39:42 UTC ---
Author: paolo
Date: Tue Sep 27 02:39:34 2011
New Revision: 179234

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179234
Log:
2011-09-26  Paolo Carlini  

PR libstdc++/50529
* include/bits/vector.tcc (vector<>::erase(iterator, iterator)):
Fix to do nothing if the range is empty.
* include/bits/stl_bvector.h: Likewise.
* include/bits/deque.tcc: Likewise.
* include/debug/vector: Adjust.
* include/debug/deque: Likewise.
* testsuite/23_containers/vector/modifiers/erase/50529.cc: New.
* testsuite/23_containers/deque/modifiers/erase/50529.cc: Likewise.
* testsuite/23_containers/deque/modifiers/erase/3.cc: Adjust.

Added:
trunk/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/50529.cc
trunk/libstdc++-v3/testsuite/23_containers/vector/modifiers/erase/50529.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/deque.tcc
trunk/libstdc++-v3/include/bits/stl_bvector.h
trunk/libstdc++-v3/include/bits/vector.tcc
trunk/libstdc++-v3/include/debug/deque
trunk/libstdc++-v3/include/debug/vector
trunk/libstdc++-v3/testsuite/23_containers/deque/modifiers/erase/3.cc


[Bug c++/50508] [C++0x] ICE cxx_eval_logical_expression cp/semantics.c:6487

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50508

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.6.2

--- Comment #5 from Jason Merrill  2011-09-27 
02:23:13 UTC ---
Fixed for 4.6.2.


[Bug c++/45012] Invalid ambiguity on partial class specialization matching

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45012

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution||FIXED
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |
   Target Milestone|--- |4.7.0
  Known to fail||

--- Comment #5 from Jason Merrill  2011-09-27 
02:22:29 UTC ---
Fixed for 4.7.


[Bug c++/46105] Ordering failure among partial specializations with non-deduced context

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46105

Jason Merrill  changed:

   What|Removed |Added

 Resolution|DUPLICATE   |FIXED
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |
   Target Milestone|--- |4.6.2

--- Comment #11 from Jason Merrill  2011-09-27 
02:21:53 UTC ---
Fixed.


[Bug c++/50508] [C++0x] ICE cxx_eval_logical_expression cp/semantics.c:6487

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50508

--- Comment #4 from Jason Merrill  2011-09-27 
02:19:00 UTC ---
Author: jason
Date: Tue Sep 27 02:18:56 2011
New Revision: 179231

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179231
Log:
PR c++/50508
* semantics.c (cxx_eval_logical_expression): Use tree_int_cst_equal
rather than ==.

Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/constexpr-typedef1.C
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/semantics.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


[Bug c++/46105] Ordering failure among partial specializations with non-deduced context

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46105

--- Comment #10 from Jason Merrill  2011-09-27 
02:19:09 UTC ---
Author: jason
Date: Tue Sep 27 02:19:05 2011
New Revision: 179232

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179232
Log:
PR c++/46105
* typeck.c (structural_comptypes): Ignore cv-quals on typename scope.

Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/template/partial12.C
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/typeck.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


[Bug c++/46105] Ordering failure among partial specializations with non-deduced context

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46105

--- Comment #9 from Jason Merrill  2011-09-27 
02:12:55 UTC ---
Author: jason
Date: Tue Sep 27 02:12:51 2011
New Revision: 179229

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179229
Log:
PR c++/46105
* typeck.c (structural_comptypes): Ignore cv-quals on typename scope.

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


[Bug target/45102] mm/page-writeback.c:820: internal compiler error: Segmentation fault

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45102

--- Comment #6 from Jason Merrill  2011-09-27 
02:13:06 UTC ---
Author: jason
Date: Tue Sep 27 02:13:00 2011
New Revision: 179230

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179230
Log:
PR c++/45102
* pt.c (tsubst_copy_and_build) [CONST_DECL]: Don't pull out
constant value if we're still in a template.

Added:
trunk/gcc/testsuite/g++.dg/template/partial13.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/50508] [C++0x] ICE cxx_eval_logical_expression cp/semantics.c:6487

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50508

--- Comment #3 from Jason Merrill  2011-09-27 
02:12:46 UTC ---
Author: jason
Date: Tue Sep 27 02:12:42 2011
New Revision: 179228

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179228
Log:
PR c++/50508
* semantics.c (cxx_eval_logical_expression): Use tree_int_cst_equal
rather than ==.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-typedef1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/45487] Request to change comma to semicolon in error message

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45487

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #5 from Paolo Carlini  2011-09-27 
01:57:32 UTC ---
Done.



[Bug c++/45487] Request to change comma to semicolon in error message

2011-09-26 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45487

--- Comment #4 from paolo at gcc dot gnu.org  
2011-09-27 01:56:22 UTC ---
Author: paolo
Date: Tue Sep 27 01:56:17 2011
New Revision: 179226

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179226
Log:
/cp
2011-09-26  Paolo Carlini  

PR c++/45487
* error.c (dump_template_bindings): Separate bindings with semicolons
instead of commas.

/testsuite
2011-09-26  Paolo Carlini  

PR c++/45487
* g++.dg/diagnostic/bindings1.C: New.
* g++.old-deja/g++.pt/memtemp77.C: Adjust.

Added:
trunk/gcc/testsuite/g++.dg/diagnostic/bindings1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.old-deja/g++.pt/memtemp77.C


[Bug libstdc++/50529] [C++0x] std::vector::erase invokes undefined behavior with empty range

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50529

--- Comment #2 from Paolo Carlini  2011-09-27 
00:45:12 UTC ---
deque too


[Bug libstdc++/50529] [C++0x] std::vector::erase invokes undefined behavior with empty range

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50529

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011-09-27
 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot
   |gnu.org |com
Summary|std::vector::erase invokes  |[C++0x] std::vector::erase
   |undefined behavior with |invokes undefined behavior
   |empty range |with empty range
 Ever Confirmed|0   |1

--- Comment #1 from Paolo Carlini  2011-09-27 
00:38:24 UTC ---
Ok, thanks, it's also an optimization.


[Bug libstdc++/50529] New: std::vector::erase invokes undefined behavior with empty range

2011-09-26 Thread delong.j at fb dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50529

 Bug #: 50529
   Summary: std::vector::erase invokes undefined behavior with
empty range
Classification: Unclassified
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: libstdc++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: delon...@fb.com


If you call vector erase() with an empty range, it invokes std::move() with an
output iterator inside of the source range.  (I.e. it tries to move all the
elements onto themselves.)  This causes problems if some of the elements don't
support self move-assignment (e.g. if they are other std::vectors).


[Bug libstdc++/48698] gnu-versioned-namespace problems

2011-09-26 Thread bkoz at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48698

--- Comment #3 from Benjamin Kosnik  2011-09-27 
00:03:00 UTC ---
Author: bkoz
Date: Tue Sep 27 00:02:54 2011
New Revision: 179221

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179221
Log:
2011-09-26  Benjamin Kosnik  

PR libstdc++/48698
* acinclude.m4 (GLIBCXX_ENABLE_SYMVERS): Set libtool_VERSION here.
* configure.ac: Move AC_SUBST of libtool_VERSION past call to
GLIBCXX_ENABLE_SYMVERS.
* configure: Regenerate.
* include/bits/c++config: Use __7 as versioned namespace name.
* config/abi/pre/gnu-versioned-namespace.ver: Change mangling as
per above.
* include/c_global/cwchar: Adjust nested namespaces.
* testsuite/20_util/bind/48698.cc: Add test case.
* testsuite/ext/profile/mutex_extensions_neg.cc: Change line number.

Added:
trunk/libstdc++-v3/testsuite/20_util/bind/48698.cc
  - copied, changed from r179220,
trunk/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/acinclude.m4
trunk/libstdc++-v3/config/abi/pre/gnu-versioned-namespace.ver
trunk/libstdc++-v3/configure
trunk/libstdc++-v3/configure.ac
trunk/libstdc++-v3/include/bits/c++config
trunk/libstdc++-v3/include/c_global/cwchar
trunk/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc


[Bug lto/47247] Linker plugin specification makes it difficult to handle COMDATs

2011-09-26 Thread ccoutant at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47247

--- Comment #24 from Cary Coutant  2011-09-26 
23:32:17 UTC ---
Author: ccoutant
Date: Mon Sep 26 23:32:13 2011
New Revision: 179220

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179220
Log:
PR lto/47247
* plugin-api.h (enum ld_plugin_symbol_resolution): Add
LDPR_PREVAILING_DEF_IRONLY_EXP.
(enum ld_plugin_tag): Add LDPT_GET_SYMBOLS_V2.

Modified:
trunk/include/ChangeLog
trunk/include/plugin-api.h



[Bug c++/35927] befriending a whole template in another namespace fails

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35927

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC|gcc-bugs at gcc dot gnu.org |
  Known to work||4.6.0, 4.6.1, 4.7.0
 Resolution||FIXED

--- Comment #2 from Paolo Carlini  2011-09-26 
22:54:16 UTC ---
Fixed in 4.6.0.


[Bug c++/46587] ICE when instantiating template member function in another template member

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46587

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to work||4.6.0, 4.6.1, 4.7.0
 Resolution||WORKSFORME

--- Comment #2 from Paolo Carlini  2011-09-26 
22:46:31 UTC ---
Closing as works for me.


[Bug c++/45487] Request to change comma to semicolon in error message

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45487

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011-09-26
 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot
   |gnu.org |com
 Ever Confirmed|0   |1

--- Comment #3 from Paolo Carlini  2011-09-26 
21:47:10 UTC ---
Thanks. Thus, if I understand correctly the request, I'm going to experiment
with changing the way we print bindings in dump_template_bindings.


[Bug c++/49637] template function overload incorrectly ambiguous

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49637

Jason Merrill  changed:

   What|Removed |Added

 Status|RESOLVED|SUSPENDED
   Last reconfirmed||2011-09-26
 Resolution|INVALID |
 Ever Confirmed|0   |1

--- Comment #12 from Jason Merrill  2011-09-26 
21:36:49 UTC ---
I've suggested that we reopen DR 214 in order to make this testcase valid.


[Bug lto/47247] Linker plugin specification makes it difficult to handle COMDATs

2011-09-26 Thread ccoutant at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47247

Cary Coutant  changed:

   What|Removed |Added

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

--- Comment #23 from Cary Coutant  2011-09-26 
20:42:20 UTC ---
Gold patch posted:

http://sourceware.org/ml/binutils/2011-09/msg00191.html

-cary


[Bug fortran/50517] gfortran must detect that actual argument type is different from dummy argument type (r178939)

2011-09-26 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50517

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #7 from janus at gcc dot gnu.org 2011-09-26 20:15:43 UTC ---
Fixed with r179213. Closing.


[Bug fortran/50515] gfortran should not accept an external that is a common (r178939)

2011-09-26 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50515

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #3 from janus at gcc dot gnu.org 2011-09-26 20:13:25 UTC ---
Fixed with r179213. Closing.


[Bug fortran/50517] gfortran must detect that actual argument type is different from dummy argument type (r178939)

2011-09-26 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50517

--- Comment #6 from janus at gcc dot gnu.org 2011-09-26 20:05:58 UTC ---
Author: janus
Date: Mon Sep 26 20:05:43 2011
New Revision: 179213

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179213
Log:
2011-09-26  Janus Weil  

PR fortran/50515
* resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.

PR fortran/50517
* interface.c (gfc_compare_interfaces): Bugfix in check for result type.


2011-09-26  Janus Weil  

PR fortran/50515
* gfortran.dg/common_15.f90: New.

PR fortran/50517
* gfortran.dg/dummy_procedure_5.f90: New.
* gfortran.dg/interface_26.f90: Modified error message.
* gfortran.dg/proc_ptr_11.f90: Ditto.
* gfortran.dg/proc_ptr_15.f90: Ditto.
* gfortran.dg/proc_ptr_comp_20.f90: Ditto.
* gfortran.dg/proc_ptr_result_5.f90: Ditto.

Added:
trunk/gcc/testsuite/gfortran.dg/common_15.f90
trunk/gcc/testsuite/gfortran.dg/dummy_procedure_5.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/interface_26.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_15.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90


[Bug fortran/50515] gfortran should not accept an external that is a common (r178939)

2011-09-26 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50515

--- Comment #2 from janus at gcc dot gnu.org 2011-09-26 20:05:57 UTC ---
Author: janus
Date: Mon Sep 26 20:05:43 2011
New Revision: 179213

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179213
Log:
2011-09-26  Janus Weil  

PR fortran/50515
* resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.

PR fortran/50517
* interface.c (gfc_compare_interfaces): Bugfix in check for result type.


2011-09-26  Janus Weil  

PR fortran/50515
* gfortran.dg/common_15.f90: New.

PR fortran/50517
* gfortran.dg/dummy_procedure_5.f90: New.
* gfortran.dg/interface_26.f90: Modified error message.
* gfortran.dg/proc_ptr_11.f90: Ditto.
* gfortran.dg/proc_ptr_15.f90: Ditto.
* gfortran.dg/proc_ptr_comp_20.f90: Ditto.
* gfortran.dg/proc_ptr_result_5.f90: Ditto.

Added:
trunk/gcc/testsuite/gfortran.dg/common_15.f90
trunk/gcc/testsuite/gfortran.dg/dummy_procedure_5.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/interface.c
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/interface_26.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_15.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f90
trunk/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90


[Bug c/50444] -ftree-isa ignores alignment

2011-09-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50444

H.J. Lu  changed:

   What|Removed |Added

Version|unknown |4.6.2
   Target Milestone|--- |4.6.2

--- Comment #4 from H.J. Lu  2011-09-26 20:01:44 
UTC ---
It is caused by revision 164515:

http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg00812.html



[Bug c++/40831] g++ generated symbols for cloned function that be demangled.

2011-09-26 Thread ccoutant at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40831

Cary Coutant  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #15 from Cary Coutant  2011-09-26 
18:33:38 UTC ---
Fixed on trunk and in gcc-4_6-branch.


[Bug c++/46105] Ordering failure among partial specializations with non-deduced context

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46105

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||paolo.carlini at oracle dot
   ||com
 Resolution||DUPLICATE

--- Comment #8 from Paolo Carlini  2011-09-26 
18:28:15 UTC ---
Thanks, let's resolve as duplicate.

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


[Bug c++/44783] implement -ftemplate-backtrace-limit=

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44783

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-09-26
 CC||jason at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #2 from Jason Merrill  2011-09-26 
18:29:15 UTC ---
Makes sense to me.


[Bug c++/40831] g++ generated symbols for cloned function that be demangled.

2011-09-26 Thread ccoutant at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40831

--- Comment #14 from Cary Coutant  2011-09-26 
18:29:52 UTC ---
Author: ccoutant
Date: Mon Sep 26 18:29:46 2011
New Revision: 179209

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

PR 40831
* demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_CLONE.

libiberty/ChangeLog:

PR 40831
* cp-demangle.c (d_make_comp): Add new component type.
(cplus_demangle_mangled_name): Check for clone suffixes.
(d_parmlist): Don't error out if we see '.'.
(d_clone_suffix): New function.
(d_print_comp): Print info for clone suffixes.
* testsuite/demangle-expected: Add new testcases.


Modified:
branches/gcc-4_6-branch/   (props changed)
branches/gcc-4_6-branch/include/ChangeLog
branches/gcc-4_6-branch/include/demangle.h
branches/gcc-4_6-branch/libiberty/ChangeLog
branches/gcc-4_6-branch/libiberty/cp-demangle.c
branches/gcc-4_6-branch/libiberty/testsuite/demangle-expected

Propchange: branches/gcc-4_6-branch/
('svn:mergeinfo' added)


[Bug c++/45012] Invalid ambiguity on partial class specialization matching

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45012

Paolo Carlini  changed:

   What|Removed |Added

 CC||potswa at mac dot com

--- Comment #4 from Paolo Carlini  2011-09-26 
18:28:15 UTC ---
*** Bug 46105 has been marked as a duplicate of this bug. ***


[Bug c++/46105] Ordering failure among partial specializations with non-deduced context

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46105

--- Comment #7 from Jason Merrill  2011-09-26 
18:24:36 UTC ---
It looks the same to me.


[Bug middle-end/50528] [4.7 Regression] SPEC CPU 2006 failed to build with LTO

2011-09-26 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50528

--- Comment #2 from Jan Hubicka  2011-09-26 
18:16:33 UTC ---
Looks like overflow in the fixed point scalling code. Will look into that.


[Bug debug/42288] please emit empty .debug_aranges section

2011-09-26 Thread mark at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42288

Mark Wielaard  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #8 from Mark Wielaard  2011-09-26 18:15:52 
UTC ---
Author: mark
Date: Tue May  3 19:36:08 2011
New Revision: 173340

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=173340
Log:
PR42288 emit empty .debug_aranges section.

* dwarf2out.c (dwarf2out_finish): Always call output_aranges ()
  when info_section_emitted.

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


[Bug c++/45487] Request to change comma to semicolon in error message

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45487

--- Comment #2 from Jason Merrill  2011-09-26 
18:12:01 UTC ---
I'm open to this change.


[Bug c++/50512] surprising change in overloading resolution

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50512

Jason Merrill  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |
   Target Milestone|--- |4.7.0

--- Comment #4 from Jason Merrill  2011-09-26 
18:10:25 UTC ---
Fixed.


[Bug c++/50512] surprising change in overloading resolution

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50512

--- Comment #3 from Jason Merrill  2011-09-26 
17:55:12 UTC ---
Author: jason
Date: Mon Sep 26 17:55:04 2011
New Revision: 179208

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179208
Log:
PR c++/50512
* call.c (compare_ics): Only consider rvaluedness_matches_p
if the target type is the same or it too differs in rvalueness.

Added:
trunk/gcc/testsuite/g++.dg/overload/rvalue3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog


[Bug middle-end/50528] [4.7 Regression] SPEC CPU 2006 failed to build with LTO

2011-09-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50528

H.J. Lu  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org
   Target Milestone|--- |4.7.0

--- Comment #1 from H.J. Lu  2011-09-26 17:45:59 
UTC ---
It is caused by revision 179126:

http://gcc.gnu.org/ml/gcc-cvs/2011-09/msg00745.html


[Bug c/50444] -ftree-isa ignores alignment

2011-09-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50444

H.J. Lu  changed:

   What|Removed |Added

 CC||jamborm at gcc dot gnu.org
Summary|unaligned movdqa|-ftree-isa ignores
   |instruction after inlining  |alignment

--- Comment #3 from H.J. Lu  2011-09-26 17:39:41 
UTC ---
-ftree-isa ignores alignment and generates:


  SR.11_17 = SR.10_18;
  MEM[(struct Engine *)e_1(D) + 40B].m = SR.11_17;
^^^

This is wrong.


[Bug c/50444] unaligned movdqa instruction after inlining

2011-09-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50444

--- Comment #2 from H.J. Lu  2011-09-26 17:24:47 
UTC ---
The problem is the wrong alignment for e->v in method.
The initial RTL has

(insn 17 16 18 4 (set (mem/s/j:V2DI (plus:DI (reg/v/f:DI 66 [ e ]) 
(const_int 40 [0x28])) [0 MEM[(struct Engine *)e_1(D) +
40B].m+0 S16 A128])
(reg:V2DI 68)) x.c:36 -1
 (nil))

A128 is wrong.


[Bug c++/29131] [DR 225] Bad name lookup for templates due to fundamental types namespace for ADL.

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29131

Jason Merrill  changed:

   What|Removed |Added

 CC||phresnel at gmail dot com

--- Comment #19 from Jason Merrill  2011-09-26 
17:07:22 UTC ---
*** Bug 41995 has been marked as a duplicate of this bug. ***


[Bug c++/41995] Incorrect point of instantiation for function template

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41995

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||DUPLICATE
   Target Milestone|--- |4.7.0

--- Comment #6 from Jason Merrill  2011-09-26 
17:07:22 UTC ---
Fixed by the patch for 29131.

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


[Bug fortran/50524] *** glibc detected *** invalid free() pointer on illegal code (r178939)

2011-09-26 Thread kargl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50524

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org 2011-09-26 16:45:25 UTC ---
Here's a patch.

Index: resolve.c
===
--- resolve.c(revision 179023)
+++ resolve.c(working copy)
@@ -4836,7 +4837,8 @@ resolve_ref (gfc_expr *expr)
 break;

   case REF_SUBSTRING:
-resolve_substring (ref);
+if (resolve_substring (ref) == FAILURE)
+  return FAILURE;
 break;
   }


[Bug middle-end/50528] New: [4.7 Regression] SPEC CPU 2006 failed to build with LTO

2011-09-26 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50528

 Bug #: 50528
   Summary: [4.7 Regression] SPEC CPU 2006 failed to build with
LTO
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hjl.to...@gmail.com


On Linux/x86-64, revision 179164 failed to build 416.gamess,
447.dealII and 481.wrf with LTO. Failure is

gfortran  -O2 -ffast-math -fwhole-program -flto=jobserver -fuse-linker-plugin 
-DSPEC_CPU_LP64 ...
lto1: internal compiler error: in account_size_time, at
ipa-inline-analysis.c:601
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
lto-wrapper: gfortran returned 1 exit status
/usr/local/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status

Revision 179104 is OK.


[Bug c++/50523] C++ FE apparently incorrectly rejects tramp3d

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50523

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #8 from Jason Merrill  2011-09-26 
15:51:15 UTC ---
Fixed.


[Bug c++/50523] C++ FE apparently incorrectly rejects tramp3d

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50523

--- Comment #7 from Jason Merrill  2011-09-26 
15:47:27 UTC ---
Author: jason
Date: Mon Sep 26 15:47:17 2011
New Revision: 179203

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179203
Log:
PR c++/50523
* call.c (implicit_conversion): Mask out inappropriate LOOKUP
flags at the top of the function.

Added:
trunk/gcc/testsuite/g++.dg/overload/ref-conv2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog


[Bug bootstrap/49804] [4.7 regression] 20110709 to 20110716 on sparc64 freebsd9.0 Configuration mismatch! [libgcc-extra-parts] Error

2011-09-26 Thread ro at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49804

Rainer Orth  changed:

   What|Removed |Added

 Status|REOPENED|NEW
 CC||ro at gcc dot gnu.org
  Component|libobjc |bootstrap
   Target Milestone|--- |4.7.0

--- Comment #5 from Rainer Orth  2011-09-26 15:29:22 UTC 
---
This was indeed introduced by my libgcc patches.  The ultimate fix is

CFT: [build] Move crtstuff support to toplevel libgcc
http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01273.html

For the moment, you can just add crtbegin.o crtbeginS.o crtend.o crtendS.o to
extra_parts in libgcc/config.host (sparc64-*-freebsd*|ultrasparc-*-freebsd*).

I hope for the patch above to be approved RSN, so if you can wait for a couple
of days, things should be fine.

Sorry.
  Rainer


[Bug c++/21057] iso C99 complex double: problems with g++

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21057

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC|gcc-bugs at gcc dot gnu.org |
  Known to work||4.5.0
 Resolution||FIXED
  Known to fail||

--- Comment #4 from Paolo Carlini  2011-09-26 
15:12:58 UTC ---
FWIW, this has been fixed for 4.5.x.


[Bug middle-end/50527] inconsistent vla align

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50527

Richard Guenther  changed:

   What|Removed |Added

 CC|rguenther at suse dot de|rguenth at gcc dot gnu.org

--- Comment #2 from Richard Guenther  2011-09-26 
15:02:23 UTC ---
The question is of course what standards say about the alignment of
alloca (4).


[Bug middle-end/50527] inconsistent vla align

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50527

--- Comment #1 from Richard Guenther  2011-09-26 
15:00:49 UTC ---
Hm, I suppose we should then make all replacement decls have BIGGEST_ALIGNMENT
rather than min (BIGGEST_ALIGNMENT, object-size).  Or alternatively
(given we re-compute alignment together with folding alloca), assign
the same alignment as folding would.


[Bug c++/50523] C++ FE apparently incorrectly rejects tramp3d

2011-09-26 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50523

--- Comment #6 from Markus Trippelsdorf  
2011-09-26 14:47:22 UTC ---
Just double-checked and a bisection with my testcase also leads
to revision 178789:

98d1b25faaa16abc483251c9acf3cb1ef79cc941 is the first bad commit
commit 98d1b25faaa16abc483251c9acf3cb1ef79cc941
Author: jason 
Date:   Mon Sep 12 18:04:46 2011 +

* call.c (convert_class_to_reference)
(convert_class_to_reference_1): Remove.
(reference_binding): Use build_user_type_conversion_1 instead.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178789
138bc75d-0d04-0410-961f-82ee72b054a4


[Bug c++/50523] C++ FE apparently incorrectly rejects tramp3d

2011-09-26 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50523

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  2011-09-26 
14:42:39 UTC ---
Reduced:

template 
struct A
{
  A();
  A(const A&);
  A(const T&);
  operator T&() const;
  operator const T&() const;
};

int main()
{
  A a;
  A a2(a);
}


[Bug middle-end/50527] New: inconsistent vla align

2011-09-26 Thread vries at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50527

 Bug #: 50527
   Summary: inconsistent vla align
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: vr...@gcc.gnu.org


Created attachment 25367
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25367
testcase, modified from pr43513.c testcase

To reproduce on x86_64:
...
$ gcc -Os pr43513-align.c --param large-stack-frame=30
$ ./a.out 
16byte aligned
7fff5c4ce00c
...

The address of the vla is printed, and it's not 16-byte aligned (ends in 'c').
Nevertheless the test whether the address is 16-byte aligned succeeds, and the
string '16byte aligned' is printed.

During compilation the following scenario happens:
- During the propagation of the first ccp phase, the align of the alloca (16)
  is progagated to the lhs results.0D.3306_13 as lattice value
  'CONSTANT 0x0 (0xfff0)'.
- This not propagated through 'D.3307_14 = &*results.0D.3306_13'. The
  propagation does not look at the lattice value of results.0D.3306_13, but at
  the alignment of the ptr_info, which at this point is not initialised yet.
- During the finalize of the first ccp phase, ptr_info of results.0D.3306_13 is
  initialized with align 16, based on the lattice value.
- During the propagation of the second ccp phase, the align of the ptr_info
  of results.0D.3306_13 of 16 is used to propagate through to the comparison
  'if (D.3309_16 == 0)', which makes sure the '16byte aligned' string is
  printed.
- During the finalize of the second ccp phase, the alloca is folded, and
  the new declared array gets an align of 4 bytes.


[Bug tree-optimization/50472] Volatile qualification in data is not enough to avoid optimization over pointer to data

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50472

Richard Guenther  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Component|regression  |tree-optimization
 Resolution||FIXED
   Target Milestone|--- |4.6.2

--- Comment #7 from Richard Guenther  2011-09-26 
14:09:49 UTC ---
Fixed for 4.6.2.


[Bug regression/50472] Volatile qualification in data is not enough to avoid optimization over pointer to data

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50472

--- Comment #6 from Richard Guenther  2011-09-26 
14:09:04 UTC ---
Author: rguenth
Date: Mon Sep 26 14:08:53 2011
New Revision: 179200

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179200
Log:
2011-09-26  Richard Guenther  

PR tree-optimization/50472
* tree-ssa-ccp.c (fold_const_aggregate_ref): Do not fold
volatile references.

* gcc.dg/torture/pr50472.c: New testcase.

Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/torture/pr50472.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/tree-ssa-ccp.c


[Bug c++/26747] bad break/continue is not detected until the gimplifier

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26747

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #9 from Paolo Carlini  2011-09-26 
13:56:33 UTC ---
Done.


[Bug c++/43734] cerr related segmentation fault

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43734

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC|gcc-bugs at gcc dot gnu.org |
 Resolution||WORKSFORME

--- Comment #7 from Paolo Carlini  2011-09-26 
13:55:08 UTC ---
Thanks Rainer. I think you provided plenty of information about possible issues
at submitter's end. Let's close this as worksforme.


[Bug c++/26747] bad break/continue is not detected until the gimplifier

2011-09-26 Thread paolo at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26747

--- Comment #8 from paolo at gcc dot gnu.org  
2011-09-26 13:52:04 UTC ---
Author: paolo
Date: Mon Sep 26 13:51:52 2011
New Revision: 179198

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179198
Log:
2011-09-26  Paolo Carlini  

PR c++/26747
* cp-gimplify.c (get_bc_label): Remove obsolete diagnostics.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c


[Bug c++/43734] cerr related segmentation fault

2011-09-26 Thread ro at CeBiTec dot Uni-Bielefeld.DE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43734

--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE  2011-09-26 13:22:58 UTC ---
Not easily, because I don't have an installed version with GNU ld
around, and haven't figured out all the options necessary to compile and
link with an uninstalled g++.

That said, the example works just fine with g++ 4.4.2, 4.5.2, and 4.6.0
configured with Sun as and ld.

A couple of comments on the configure options used:

Configured with: ../gcc-4.4.3/configure --prefix=/usr/local/gcc-4.4.3
--disable-shared --enable-languages=c,c++ --enable-threads=posix

Why --disable-shared?  This may cause problems and isn't tested.

--enable-__cxa_atexit --with-gnu-as --with-as=/usr/local/binutils-2.20.1/bin/as

--enable-__cxa_atexit cannot work on Solaris.  I'm working on a patch
for the necessary libc support, but that will make it into Solaris 12 or
a Solaris 11 update at the earliest.  The option should be harmless, but
is certainly useless.

--with-gnu-ld --with-ld=/usr/local/binutils-2.20.1/bin/ld

The installation guide strongly recomments using Sun ld on Solaris for a
reason.  Many patches necessary to improve the situation with GNU ld on
Solaris only went into binutils 2.21, so I'd strongly suggest to retry
with gld 2.21.1 if you really insist on using GNU ld.

Rainer


[Bug regression/50472] Volatile qualification in data is not enough to avoid optimization over pointer to data

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50472

--- Comment #5 from Richard Guenther  2011-09-26 
12:59:02 UTC ---
Author: rguenth
Date: Mon Sep 26 12:58:35 2011
New Revision: 179196

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179196
Log:
2011-09-26  Richard Guenther  

PR tree-optimization/50472
* gimple-fold.c (fold_const_aggregate_ref_1): Do not fold
volatile references.

* gcc.dg/torture/pr50472.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr50472.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-fold.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/50523] C++ FE apparently incorrectly rejects tramp3d

2011-09-26 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50523

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||markus at trippelsdorf dot
   ||de

--- Comment #4 from Markus Trippelsdorf  
2011-09-26 12:31:32 UTC ---
(In reply to comment #3)
> This testcase fails with all of 4.6, r178788 and r178789, so I doubt it is the
> right testcase for this bug.
> 
> I'm running delta using a test if r178788 -fpermissive compiles it without
> errors and r178789 -fpermissive with errors, so far in 90 minutes reduced it
> from 2.8MB down to 1.9MB.  So it will take a while.

Hm, it succeeds (meaning it fails with a different error: 
error: ‘const class GridLayout<3>’ has no member named ‘innerDomain’)
with 4.6.3 and 4.5.3 on my box.


[Bug target/50465] [avr] Use insn attribute to depict if and how instruction lengths have to be adjusted

2011-09-26 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50465

Georg-Johann Lay  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #4 from Georg-Johann Lay  2011-09-26 
12:30:25 UTC ---
Fixed now.


[Bug c++/50523] C++ FE apparently incorrectly rejects tramp3d

2011-09-26 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50523

--- Comment #3 from Jakub Jelinek  2011-09-26 
12:14:13 UTC ---
This testcase fails with all of 4.6, r178788 and r178789, so I doubt it is the
right testcase for this bug.

I'm running delta using a test if r178788 -fpermissive compiles it without
errors and r178789 -fpermissive with errors, so far in 90 minutes reduced it
from 2.8MB down to 1.9MB.  So it will take a while.


[Bug c++/26747] bad break/continue is not detected until the gimplifier

2011-09-26 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26747

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC|gcc-bugs at gcc dot |
   |gnu.org, paolo.carlini at   |
   |oracle dot com  |
 AssignedTo|unassigned at gcc dot   |paolo.carlini at oracle dot
   |gnu.org |com

--- Comment #7 from Paolo Carlini  2011-09-26 
12:11:54 UTC ---
Thanks Manuel, I'll send a patch.


[Bug c++/50523] C++ FE apparently incorrectly rejects tramp3d

2011-09-26 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50523

--- Comment #2 from Markus Trippelsdorf  
2011-09-26 12:07:55 UTC ---
Created attachment 25366
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25366
testcase

Reduced to ~560 lines.

 % g++ testcase.cpp -Wfatal-errors
testcase.cpp: In instantiation of ‘BinaryNode::BinaryNode(const Left&, const Right&) [with Op = OpSubtract, Left =
Reference, Vector<3>, ViewEngine<3,
IndexFunction >::PositionsFunctor> > > >, Right = Scalar >]’:
testcase.cpp:318:123:   required from ‘typename
MakeFieldReturn
>::Leaf_t, typename CreateLeaf::Leaf_t> >::Expression_t operator-(const
Field&, const T2&) [with G1 = NoMesh<3>, T1 = Vector<3>, E1 =
ViewEngine<3, IndexFunction >::PositionsFunctor> >, T2 = Vector<3>,
typename MakeFieldReturn >::Leaf_t, typename CreateLeaf::Leaf_t> >::Expression_t =
Field, Vector<3>, ExpressionTag, Vector<3>, ViewEngine<3,
IndexFunction >::PositionsFunctor> > > >, Scalar > > > >]’
testcase.cpp:567:74:   required from here
testcase.cpp:34:83: error: conversion from ‘const Reference,
Vector<3>, ViewEngine<3, IndexFunction >::PositionsFunctor> > > >’ to ‘const
Field, Vector<3>, ViewEngine<3,
IndexFunction >::PositionsFunctor> > >&’ is ambiguous
compilation terminated due to -Wfatal-errors.


[Bug target/50465] [avr] Use insn attribute to depict if and how instruction lengths have to be adjusted

2011-09-26 Thread gjl at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50465

--- Comment #3 from Georg-Johann Lay  2011-09-26 
11:53:55 UTC ---
Author: gjl
Date: Mon Sep 26 11:53:40 2011
New Revision: 179191

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179191
Log:
PR target/50465
* config/avr/avr-protos.h (output_reload_insisf): Don't pass insn.
* config/avr/avr.md (*reload_insi, *reload_insf): Change call to
output_reload_insisf.
(adjust_len): Set default to "no".
Remove alternative "yes".  Add alternatives: "mov8", "mov16",
"mov32", "ashlqi", "ashrqi", "lshrqi", "ashlhi", "ashrhi",
"lshrhi", "ashlsi, "ashrsi", "lshrsi".
(*movqi, *movhi, *movsi, *ashlqi3, ashlhi3, ashlsi3,
*ashlhi3_const, *ashlsi3_const, ashrqi3, ashrhi3, ashrsi3,
*ashrhi3_const, *ashrsi3_const, *lshrqi3, lshrhi3, *lshrhi3_const,
*lshrsi3_const): Set attribute "adjust_len".
* config/avr/avr.c (output_reload_insisf): Remove parameter "insn".
(output_movsisf): Don't pass insn to output_reload_insisf.
(adjust_insn_length): Handle new alternatives to adjust_len.
Remove handling of ADJUST_LEN_YES.  Clean-up code.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr-protos.h
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.md


[Bug c/50521] -fstrict-volatile-bitfields is not strict

2011-09-26 Thread kikairoya at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50521

--- Comment #2 from Tomohiro Kashiwada  2011-09-26 
11:42:37 UTC ---
Variable 'bitfield' declared as volatile, so all bitfield's members are
volatile.
Even if declare 'bits' as volatile, gcc dumps same code.
However, adding option -fno-strict-volatile-bitfields instead of
-fstrict-volatile-bitfields, gcc ignores type of bit-field.


[Bug ada/50526] New: Assert_Failure sinfo.adb:717

2011-09-26 Thread baldrick at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50526

 Bug #: 50526
   Summary: Assert_Failure sinfo.adb:717
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: baldr...@gcc.gnu.org


$ gcc-4.7 -S p.ads
+===GNAT BUG DETECTED==+
| 4.7.0 20110926 (experimental) (x86_64-unknown-linux-gnu) Assert_Failure
sinfo.adb:717|
...

Testcase:

-- chop here --
generic
   type T is tagged private;
   type A is access T'Class;
package G is
   type NA is new A;
end;

with G;
package P is
   type T is tagged null record;
   type A is access T'Class;
   package I is new G (T, A);
end;


[Bug c/50521] -fstrict-volatile-bitfields is not strict

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50521

--- Comment #1 from Richard Guenther  2011-09-26 
10:48:15 UTC ---
I don't think volatile union bitfield constitutes a "volatile bitfield" as
per what GCC implements.


[Bug rtl-optimization/50380] cc1 hangs eating 100% CPU

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50380

--- Comment #4 from Richard Guenther  2011-09-26 
10:46:06 UTC ---
*** Bug 50474 has been marked as a duplicate of this bug. ***


[Bug c++/50474] GCC (cc1plus) hangs forever compiling with -O2 (-fcse-follow-jumps)

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50474

Richard Guenther  changed:

   What|Removed |Added

 Resolution|INVALID |DUPLICATE

--- Comment #4 from Richard Guenther  2011-09-26 
10:46:06 UTC ---
.

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


[Bug tree-optimization/50522] C++ std::valarray vectorization missed optimization

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50522

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-09-26
 Ever Confirmed|0   |1

--- Comment #2 from Richard Guenther  2011-09-26 
10:36:38 UTC ---
(In reply to comment #1)
> Created attachment 25365 [details]
> gcc47-pr50522-hack.patch
> 
> The perhaps safer hack, which handles only pointers initialized from
> casted TYPE_RESTRICT or POINTER_PLUS_EXPR of TYPE_RESTRICT.  Both functions 
> are
> still vectorized.

Looks like a hack ;)

Restrict support was designed to work without the TYPE_RESTRICT checks but
ISTR there were miscompiles without adding them - maybe all latent issues
have been fixed now, but you might run into PR48764 more often.

Restrict will propagate through ptr/int/ptr conversions but should end up
aliased whenever two resulting pointers are based off the same initial
restrict tag.  Thus, if removing TYPE_RESTRICT checks bootstraps and tests
ok, I'd approve that patch ...


[Bug c++/42032] Aliasing errors in stl_tree.h

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42032

Richard Guenther  changed:

   What|Removed |Added

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

--- Comment #12 from Richard Guenther  2011-09-26 
10:30:35 UTC ---
Nope.  Marking fixed in 4.5.


[Bug lto/45810] 40% slowdown when using LTO for a single-file program

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45810

Richard Guenther  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #27 from Richard Guenther  2011-09-26 
10:16:20 UTC ---
Yes, I think I analyzed the reason for this at some point (IPA profile) and
fixed it.


[Bug fortran/50525] New: gfortran should not allow early reference to entry dummy argument (r178939)

2011-09-26 Thread zeccav at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50525

 Bug #: 50525
   Summary: gfortran should not allow early reference to entry
dummy argument  (r178939)
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zec...@gmail.com


! gfortran should not allow early reference to entry dummy argument  (r178939) 
  subroutine sub
  f(y)=x ! this is wrong
  entry e(x)
  end


[Bug fortran/50524] New: *** glibc detected *** invalid free() pointer on illegal code (r178939)

2011-09-26 Thread zeccav at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50524

 Bug #: 50524
   Summary: *** glibc detected *** invalid free() pointer on
illegal code  (r178939)
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: minor
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: zec...@gmail.com


!*** glibc detected *** invalid free() pointer on illegal code  (r178939)
!*/home/vitti/gcc-trunk/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/f951:
!*free(): invalid pointer: 0x0001 ***
! before compilation must export MALLOC_CHECK_=1
  print *,'qwe'(1:1e0)
  end


[Bug c++/50523] C++ FE apparently incorrectly rejects tramp3d

2011-09-26 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50523

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-09-26
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #1 from Jakub Jelinek  2011-09-26 
09:50:05 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178789


[Bug c++/50474] GCC (cc1plus) hangs forever compiling with -O2 (-fcse-follow-jumps)

2011-09-26 Thread mikpe at it dot uu.se
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50474

--- Comment #3 from Mikael Pettersson  2011-09-26 
09:38:11 UTC ---
(In reply to comment #2)
> The behaviour seems to be related to the code line
> if(r != !!r)

This is clearly a dup of PR50380.


[Bug c++/50523] New: C++ FE apparently incorrectly rejects tramp3d

2011-09-26 Thread hubicka at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50523

 Bug #: 50523
   Summary: C++ FE apparently incorrectly rejects tramp3d
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: hubi...@gcc.gnu.org


In between the following two builds:
> 110912.64071 
> 110913.25243

tramp3d stopped building with following errors:
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp: In instantiation of 'static
CreateLeaf >::Return_t CreateLeaf
>::make(const Input_t&) [with GeometryTag = NoMesh<3>, T = Vector<3, double,
Full>, EngineTag = ViewEngine<3, IndexFunction >::PositionsFunctor> >,
CreateLeaf >::Return_t = Reference, Vector<3,
double, Full>, ViewEngine<3, IndexFunction >::PositionsFunctor> > > >,
CreateLeaf >::Input_t = Field, Vector<3, double,
Full>, ViewEngine<3, IndexFunction >::PositionsFunctor> > >]':
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:42503:44:   required from
'typename MakeFieldReturn >::Leaf_t, typename CreateLeaf >::Leaf_t>
>::Expression_t operator-(const Field&, const Vector&)
[with G1 = NoMesh<3>, T1 = Vector<3, double, Full>, E1 = ViewEngine<3,
IndexFunction >::PositionsFunctor> >, int D2 = 3, T2 = double, E2 = Full,
typename MakeFieldReturn >::Leaf_t, typename CreateLeaf >::Leaf_t>
>::Expression_t = Field, Vector<3, double, Full>,
ExpressionTag, Vector<3,
double, Full>, ViewEngine<3, IndexFunction >::PositionsFunctor> > > >,
Scalar > > > >]'
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:55995:68:   required from
here
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:43646:22: error: conversion
from 'CreateLeaf, Vector<3, double, Full>, ViewEngine<3,
IndexFunction >::PositionsFunctor> > > >::Leaf_t {aka
Reference, Vector<3, double, Full>, ViewEngine<3,
IndexFunction >::PositionsFunctor> > > >}' to 'const Field,
Vector<3, double, Full>, ViewEngine<3, IndexFunction >::PositionsFunctor> > >&' is
ambiguous
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:43646:22: note: candidates
are:
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:817:3: note:
Reference::operator T&() const [with T = Field, Vector<3, double,
Full>, ViewEngine<3, IndexFunction >::PositionsFunctor> > >]
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:816:3: note:
Reference::operator const T&() const [with T = Field, Vector<3,
double, Full>, ViewEngine<3, IndexFunction >::PositionsFunctor> > >]
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp: In instantiation of
'BinaryNode::BinaryNode(const Left&, const Right&) [with Op =
OpSubtract, Left = Reference, Vector<3, double, Full>,
ViewEngine<3, IndexFunction >::PositionsFunctor> > > >, Right =
Scalar >]':
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:42503:44:   required from
'typename MakeFieldReturn >::Leaf_t, typename CreateLeaf >::Leaf_t>
>::Expression_t operator-(const Field&, const Vector&)
[with G1 = NoMesh<3>, T1 = Vector<3, double, Full>, E1 = ViewEngine<3,
IndexFunction >::PositionsFunctor> >, int D2 = 3, T2 = double, E2 = Full,
typename MakeFieldReturn >::Leaf_t, typename CreateLeaf >::Leaf_t>
>::Expression_t = Field, Vector<3, double, Full>,
ExpressionTag, Vector<3,
double, Full>, ViewEngine<3, IndexFunction >::PositionsFunctor> > > >,
Scalar > > > >]'
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:55995:68:   required from
here
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:876:27: error: conversion
from 'const Reference, Vector<3, double, Full>, ViewEngine<3,
IndexFunction >::PositionsFunctor> > > >' to 'const Field,
Vector<3, double, Full>, ViewEngine<3, IndexFunction >::PositionsFunctor> > >&' is
ambiguous
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:876:27: note: candidates are:
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:817:3: note:
Reference::operator T&() const [with T = Field, Vector<3, double,
Full>, ViewEngine<3, IndexFunction >::PositionsFunctor> > >]
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:816:3: note:
Reference::operator const T&() const [with T = Field, Vector<3,
double, Full>, ViewEngine<3, IndexFunction >::PositionsFunctor> > >]
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp: In instantiation of 'static
CreateLeaf >::Return_t CreateLeaf
>::make(const Input_t&) [with GeometryTag =
UniformRectilinearMesh >, T = double, EngineTag = MultiPatch
>, CreateLeaf >::Return_t =
Reference >, double, MultiPatch > > >, CreateLeaf >::Input_t =
Field >, double, MultiPatch > >]':
/gcc/spec/scripts/c++bench/tramp3d/tramp3d-v4.cpp:40105:43:   required from
'typename MakeFieldReturn >::Leaf_t, typename CreateLeaf >::Leaf_t>
>::Expression_t operator*(const Field&, const Field&)
[with G1 = UniformRectilinearMesh >, T1 = double, E1 = MultiPatch >, G2 =
UniformRectilinearMesh >, T2 = double, E2 = MultiPatch >,
typename MakeFieldReturn >::Leaf_t, typename CreateLeaf >::Leaf_t>
>::Expression_t = Field >, double,
Expressio

[Bug fortran/50517] gfortran must detect that actual argument type is different from dummy argument type (r178939)

2011-09-26 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50517

janus at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||accepts-invalid
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011-09-26
 AssignedTo|unassigned at gcc dot   |janus at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #5 from janus at gcc dot gnu.org 2011-09-26 09:12:04 UTC ---
With the following patch, both comment #0 and comment #2 are correctly
rejected:


Index: gcc/fortran/interface.c
===
--- gcc/fortran/interface.c(revision 179143)
+++ gcc/fortran/interface.c(working copy)
@@ -1124,10 +1124,10 @@ gfc_compare_interfaces (gfc_symbol *s1, gfc_symbol
   /* If both are functions, check type and kind.  */
   if (s1->ts.type == BT_UNKNOWN)
 return 1;
-  if ((s1->ts.type != s2->ts.type) || (s1->ts.kind != s2->ts.kind))
+  if (!compare_type_rank (s1,s2))
 {
   if (errmsg != NULL)
-snprintf (errmsg, err_len, "Type/kind mismatch in return value "
+snprintf (errmsg, err_len, "Type/rank mismatch in return value "
   "of '%s'", name2);
   return 0;
 }


[Bug fortran/50463] [4.6/4.7 Regression] -ftree-dse leeds to wrong code with gfortran

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50463

Richard Guenther  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID

--- Comment #7 from Richard Guenther  2011-09-26 
09:08:26 UTC ---
Invalid.

  COMMON / / ARRAY(1)

  ARRAY(START) = CHECK
  ARRAY(LIMIT) = CHECK

the first store is dead as the only valid values for both START and
LIMIT are 1 because of the size specification in the declaration of
ARRAY.

If the fortran standard makes accessing ARRAY(i) with i != 1 well-defined
then the Frontend may not provide a declaration of ARRAY with size 1
to the middle-end.


[Bug middle-end/50460] [4.7 Regression] __builtin___strcpy_chk/__builtin_object_size don't work

2011-09-26 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50460

--- Comment #6 from Jakub Jelinek  2011-09-26 
09:08:36 UTC ---
#define strcpy(x,y) __builtin___strcpy_chk (x, y, __builtin_object_size (x, 1))

int
f1 (void)
{
  struct A { char buf1[9]; char buf2[4]; } a;
  strcpy (a.buf1 + 9, "a");
  return 0;
}

int
f2 (void)
{
  struct A { char buf1[9]; char buf2[4]; } a;
  strcpy (a.buf2 + 0, "a");
  return 0;
}

int
f3 (void)
{
  struct A { char buf1[9]; char buf2[4]; } a;
  strcpy (a.buf1 + 10, "a");
  return 0;
}

int
f4 (void)
{
  struct A { char buf1[9]; char buf2[4]; } a;
  strcpy (a.buf2 - 1, "a");
  return 0;
}

int
f5 (void)
{
  struct A { char buf1[9]; char buf2[4]; } a;
  strcpy ((char *) &a + 10, "a");
  return 0;
}

int
f6 (void)
{
  struct A { char buf1[9]; char buf2[4]; } a;
  strcpy ((char *) a.buf2 - 1, "a");
  return 0;
}

used to warn in f{1,3,4,6} (and fail at runtime) and not in f{2,5} in
4.{1,2,3,4,6} (haven't checked 4.5), doesn't warn nor fail on the trunk.
So yes, 4.0+ clearly did some reconstruction, but only in limited cases (e.g.
when the &a is offsetted).  Some field + offset remained COMPONENT_REF +
offset.


[Bug c++/50474] GCC (cc1plus) hangs forever compiling with -O2 (-fcse-follow-jumps)

2011-09-26 Thread steffen-schmidt at siemens dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50474

--- Comment #2 from Steffen Schmidt  
2011-09-26 09:04:33 UTC ---
I'm very sorry for the inconvenience, but this bug is not directly related to
any CodeSourcery built GCC toolchain. It was a pure coincedence using such a
toolchain.

I am able to reproduce the effect with toolchain GCC 4.6.0 for MIPS built from
source using MinGW:

Target: mips-siemens-elf
Configured with: ../../gcc-4.6.0/configure --enable-languages=c,c++
--with-arch=mips32r2 -enable-poison-system-directories --enable-interwork
--enable-multilib --enable-sgxx-sde-multilibs --with-gcc --with-gnu-ld
--with-gnu-as --with-stabs --disable-libmudflap --disable-libssp
--disable-shared --disable-threads --disable-libgomp --disable-win32-registry
--disable-nls --target=mips-siemens-elf --with-newlib
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--prefix=/build_mips_4.6.0_cloog/cross-gcc/mips-siemens-elf
--with-gmp=/build_mips_4.6.0_cloog/host
--with-mpfr=/build_mips_4.6.0_cloog/host
--with-mpc=/build_mips_4.6.0_cloog/host --with-ppl=/build_mips_4.6.0_cloog/host
--with-cloog=/build_mips_4.6.0_cloog/host
--with-sysroot=/build_mips_4.6.0_cloog/cross-gcc/mips-siemens-elf
Thread model: single
gcc version 4.6.0 (GCC)

The behaviour seems to be related to the code line
if(r != !!r)

When replacing the condition with the equivalent
if(r != 0 && r != 1)

everything seems fine.

Is it worth investigating the issue further and re-open it?


[Bug fortran/50517] gfortran must detect that actual argument type is different from dummy argument type (r178939)

2011-09-26 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50517

--- Comment #4 from janus at gcc dot gnu.org 2011-09-26 09:01:45 UTC ---
(In reply to comment #1)
> Could you explain why you assume that this is invalid? I would say it is valid
> at least in F95, see Fortran 95 standard, chapter 4.4.2, "Determination of
> derived types". 

However, this only applies to types in different namespaces. If they are in the
same namespace, the type symbols themselves must be equal. In consequence, I
agree that the test case in comment #0 is invalid.


[Bug fortran/50517] gfortran must detect that actual argument type is different from dummy argument type (r178939)

2011-09-26 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50517

--- Comment #3 from janus at gcc dot gnu.org 2011-09-26 08:45:49 UTC ---
(In reply to comment #1)
> Could you explain why you assume that this is invalid? I would say it is valid
> at least in F95, see Fortran 95 standard, chapter 4.4.2, "Determination of
> derived types". 

However, this only applies to types in different namespaces. If they are in the
same namespace, the type symbols themselves must be equal. In consequence, I
agree that the test case in comment #0 is invalid.


[Bug tree-optimization/34265] Missed optimizations

2011-09-26 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34265

Richard Guenther  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||FIXED

--- Comment #37 from Richard Guenther  2011-09-26 
08:36:26 UTC ---
Testcases for runtime properties are not supported.


[Bug tree-optimization/50522] C++ std::valarray vectorization missed optimization

2011-09-26 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50522

--- Comment #1 from Jakub Jelinek  2011-09-26 
08:23:15 UTC ---
Created attachment 25365
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25365
gcc47-pr50522-hack.patch

The perhaps safer hack, which handles only pointers initialized from
casted TYPE_RESTRICT or POINTER_PLUS_EXPR of TYPE_RESTRICT.  Both functions are
still vectorized.


[Bug fortran/50517] gfortran must detect that actual argument type is different from dummy argument type (r178939)

2011-09-26 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50517

--- Comment #2 from janus at gcc dot gnu.org 2011-09-26 08:09:09 UTC ---
Unfortunately, gfortran also does not reject it if the types actually differ:

program main
  type t
integer :: i
  end type

  type u
real :: r
  end type

  type(u), external :: ufunction

  call sub(ufunction) ! gfortran should emit an error message here

contains

  subroutine sub(tfunction)
type(t), external :: tfunction
  end subroutine

end program 



When exchanging type(u)/type(t) for integer/real, the check works:

  call sub(ufunction) ! gfortran should emit an error message here
   1
Error: Interface mismatch in dummy procedure 'tfunction' at (1): Type/kind
mismatch in return value of 'ufunction'


[Bug c++/26747] bad break/continue is not detected until the gimplifier

2011-09-26 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26747

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #6 from Manuel López-Ibáñez  2011-09-26 
08:06:31 UTC ---
(In reply to comment #5)
> Isn't the C++ front-end also fixed?  I can confirm that currently the error
> comes from cp_parser_jump_statement.  In general, the check in build_bc_goto 
> is
> apparently dead: I have been able to build and test with gcc_assert (label) in
> its place...

So, remove it and close this for good?


[Bug rtl-optimization/38644] [4.4/4.5/4.6/4.7 Regression] Optimization flag -O1 -fschedule-insns2 causes wrong code

2011-09-26 Thread rguenther at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644

--- Comment #51 from rguenther at suse dot de  
2011-09-26 08:04:37 UTC ---
On Mon, 12 Sep 2011, rearnsha at arm dot com wrote:

> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38644
> 
> --- Comment #48 from Richard Earnshaw  2011-09-12 
> 15:31:51 UTC ---
> On 12/09/11 16:18, law at redhat dot com wrote:
> 
> > A much simpler way to fix this is to emit a barrier just prior to 
> > mucking around with stack pointer in the epilogue.  That's how targets 
> > have dealt with this exact issue for a couple decades.
> 
> Simpler, but wrong.  The compiler should not be generating unsafe code
> by default.  The problem is in the mid-end and expecting every port to
> get this right in order to work-around a mid-end bug is just stupid
> stupid stupid.
> 
> The mid end should not be scheduling around stack moves unless it has
> been explicitly told it is safe to do this.  I don't understand why
> there is so much resistance to fixing the problem properly.

The middle-end does not treat stack moves specially, they are just
memory accesses.  Extra dependences have to be modeled accordingly.
It's a hack to treat stack moves specially, not a proper fix.


[Bug fortran/50517] gfortran must detect that actual argument type is different from dummy argument type (r178939)

2011-09-26 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50517

janus at gcc dot gnu.org changed:

   What|Removed |Added

 CC||janus at gcc dot gnu.org

--- Comment #1 from janus at gcc dot gnu.org 2011-09-26 08:05:10 UTC ---
(In reply to comment #0)
> ! gfortran must detect that actual argument type is different from dummy
> argument type (r178939)

Could you explain why you assume that this is invalid? I would say it is valid
at least in F95, see Fortran 95 standard, chapter 4.4.2, "Determination of
derived types". I haven't checked if this is still the case in F03 or F08.

gfortran has a routine to check if two derived types are actually the same
("gfc_compare_derived_types" in interface.c).


[Bug c++/26748] gimplify_expr_stmt in cp-gimplifer.c does warnings

2011-09-26 Thread manu at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26748

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #3 from Manuel López-Ibáñez  2011-09-26 
08:03:42 UTC ---
(In reply to comment #2)
> Andrew what is the issue here? Can you clarify?

That the gimplifier should not emit syntax diagnostics, but the way GCC is
designed, this may well be impossible in some cases.

Bonus points for managing to share the warning between C and C++.


[Bug tree-optimization/50522] New: C++ std::valarray vectorization missed optimization

2011-09-26 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50522

 Bug #: 50522
   Summary: C++ std::valarray vectorization missed optimization
Classification: Unclassified
   Product: gcc
   Version: 4.7.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: tree-optimization
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: ja...@gcc.gnu.org
CC: i...@gcc.gnu.org, ja...@gcc.gnu.org,
rgue...@gcc.gnu.org


#include 

std::valarray
f1 (std::valarray a, std::valarray b, std::valarray c, int z)
{
  int i;
  for (i = 0; i < z; i++)
{
  a[i] = b[i] + c[i];
  a[i] += b[i] * c[i];
}
  return a;
}

void
f2 (std::valarray &__restrict a, std::valarray &__restrict b,
std::valarray &__restrict c, int z)
{
  int i;
  for (i = 0; i < z; i++)
{
  a[i] = b[i] + c[i];
  a[i] += b[i] * c[i];
}
}

should be vectorizable (f2 only since
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179166 ), but it is not.

There seems to be 2 problems:
1) from the inlines we unfortunately have pointers (resp. references)
initialized from TYPE_RESTRICT pointers, which don't have TYPE_RESTRICT
themselves.
--- tree-ssa-alias.c.jj 2011-09-15 12:18:37.0 +0200
+++ tree-ssa-alias.c 2011-09-26 09:10:50.0 +0200
@@ -223,7 +223,6 @@ ptr_deref_may_alias_decl_p (tree ptr, tr
  pointer and that pointers points-to set doesn't contain this decl
  then they can't alias.  */
   if (DECL_RESTRICTED_P (decl)
-  && TYPE_RESTRICT (TREE_TYPE (ptr))
   && pi->pt.vars_contains_restrict)
 return bitmap_bit_p (pi->pt.vars, DECL_PT_UID (decl));

@@ -319,8 +318,8 @@ ptr_derefs_may_alias_p (tree ptr1, tree 

   /* If both pointers are restrict-qualified try to disambiguate
  with restrict information.  */
-  if (TYPE_RESTRICT (TREE_TYPE (ptr1))
-  && TYPE_RESTRICT (TREE_TYPE (ptr2))
+  if (pi1->pt.vars_contains_restrict
+  && pi2->pt.vars_contains_restrict
   && !pt_solutions_same_restrict_base (&pi1->pt, &pi2->pt))
 return false;

seems to fix that part, but maybe it is too unsafe (would e.g.
vars_contains_restrict propagate through cast of a pointer to integer and
back?).  Maybe just a quick hack of allowing either TYPE_RESTRICT, or
POINTER_TYPE_P SSA_NAME initialized from either a pointer cast or
POINTER_PLUS_EXPR from a TYPE_RESTRICT pointer would be enough to fix this and
don't regress problematic __restrict cases (richi, which are the currently
known ones?).

2) even with that change, the vectorizer didn't vectorize this.  But apparently
this turned out to be something Eric fixed over the weekend - r179165 - where
simple_iv checked just for POINTER_TYPE and not for POINTER_TYPE_P.


[Bug fortran/50515] gfortran should not accept an external that is a common (r178939)

2011-09-26 Thread janus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50515

janus at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Keywords||accepts-invalid
   Last reconfirmed||2011-09-26
 CC||janus at gcc dot gnu.org
 AssignedTo|unassigned at gcc dot   |janus at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #1 from janus at gcc dot gnu.org 2011-09-26 07:41:11 UTC ---
Trivial patch:

Index: gcc/fortran/resolve.c
===
--- gcc/fortran/resolve.c(revision 179143)
+++ gcc/fortran/resolve.c(working copy)
@@ -905,6 +905,10 @@ resolve_common_blocks (gfc_symtree *common_root)
 gfc_error ("COMMON block '%s' at %L is used as PARAMETER at %L",
sym->name, &common_root->n.common->where, &sym->declared_at);

+  if (sym->attr.external)
+gfc_error ("COMMON block '%s' at %L can not have the EXTERNAL attribute",
+   sym->name, &common_root->n.common->where);
+
   if (sym->attr.intrinsic)
 gfc_error ("COMMON block '%s' at %L is also an intrinsic procedure",
sym->name, &common_root->n.common->where);


[Bug target/50493] ICE in neon_disambiguate_copy, at config/arm/arm.c:20388

2011-09-26 Thread irar at il dot ibm.com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50493

Ira Rosen  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-09-26
 CC||irar at il dot ibm.com,
   ||ramana at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #2 from Ira Rosen  2011-09-26 07:18:29 UTC 
---
Looks like the problem is with neon_movv4si. 

My patch enabled the use of quad-word vectors by default, the test doesn't fail
with double-words.