[Bug tree-optimization/71168] New: [7 Regression] ICE in find_uses_to_rename_use (tree-ssa-loop-manip.c:379)

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71168

Bug ID: 71168
   Summary: [7 Regression] ICE in find_uses_to_rename_use
(tree-ssa-loop-manip.c:379)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Hi.

Running latest GCC w/ -O3 for:

$ cat tc.i
a, b, c;
long *d;
fn1() {
  for (; 0 < a;)
a++;
}
fn2() {
  if (b)
fn3();
  fn1();
}
fn3() {
  for (; c; c++)
d[c] = 0;
}

$ gcc -O3 tc.i -c

tc.i: In function ‘fn2’:
tc.i:7:1: internal compiler error: Segmentation fault
 fn2() {
 ^~~
0xeaabd6 crash_signal
../../gcc/toplev.c:333
0x10662ff gimple_bb
../../gcc/gimple.h:1736
0x106897c find_uses_to_rename_use
../../gcc/tree-ssa-loop-manip.c:379
0x1068c32 find_uses_to_rename_bb
../../gcc/tree-ssa-loop-manip.c:451
0x1068da5 find_uses_to_rename
../../gcc/tree-ssa-loop-manip.c:479
0x1069280 rewrite_into_loop_closed_ssa_1(bitmap_head*, unsigned int, int,
loop*)
../../gcc/tree-ssa-loop-manip.c:642
0x1069330 rewrite_into_loop_closed_ssa(bitmap_head*, unsigned int)
../../gcc/tree-ssa-loop-manip.c:675
0xf6a160 execute
../../gcc/tree-loop-distribution.c:1830

Martin

[Bug tree-optimization/71168] [7 Regression] ICE in find_uses_to_rename_use (tree-ssa-loop-manip.c:379)

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71168

--- Comment #1 from Martin Liška  ---
Started with r236320:

Author: rguenth 
Date:   Tue May 17 12:53:30 2016 +

2016-05-17  Richard Biener  

PR tree-optimization/71132
* tree-loop-distribution.c (create_rdg_cd_edges): Pass in loop.
Only add control dependences for blocks in the loop.
(build_rdg): Adjust.
(generate_code_for_partition): Return whether loop should
be destroyed and delay that.
(distribute_loop): Likewise.
(pass_loop_distribution::execute): Record loops to be destroyed
and perform delayed destroying of loops.

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

Martin

[Bug fortran/71156] PURE interface/definition inconsistency: accepts invalid, rejects valid

2016-05-18 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71156

Paul Thomas  changed:

   What|Removed |Added

 CC||pault at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |pault at gcc dot gnu.org

--- Comment #1 from Paul Thomas  ---
I'll get on to it today.

Thanks for the report.

Paul

[Bug c++/71164] tree check fail at cp/pt.c:12961

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71164

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška  ---
Reducing the attached test-case.

[Bug tree-optimization/71120] [6/7 Regression] Aliasing "struct sockaddr_storage" produces invalid code due to SRA

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71120

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |INVALID

--- Comment #4 from Richard Biener  ---
Actually the bug is in the testcase as it aggregate-copies

struct sockaddr_storage
  {
sa_family_t ss_family;
unsigned long int __ss_align;
char __ss_padding[(128 - (2 * sizeof (unsigned long int)))];
  };

where by C rules an aggregate copy copies each field and thus leaves padding
undefined.

Thus this is a libc bug of having padding between ss_family and __ss_align.

And thus this has nothing to do with strict aliasing.  It's rather a glibc
bug (or specification bug wherever sockaddr_storage is specified).

[Bug c++/71169] New: [7 Regression] ICE on invalid C++ code in pop_nested_class (cp/class.c:7785)

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71169

Bug ID: 71169
   Summary: [7 Regression] ICE on invalid C++ code in
pop_nested_class (cp/class.c:7785)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Hi.

Follow code was created during reduction of a different problem:

$ cat invalid.cc 
template  class A {
  template  m_fn1() {
  m_fn1()
  }
}

$ invalid.cc:1:11: error: ‘Preconditioner’ has not been declared
 template  class A {
   ^~
invalid.cc:2:32: error: ISO C++ forbids declaration of ‘m_fn1’ with no type
[-fpermissive]
   template  m_fn1() {
^
invalid.cc:5:1: error: expected ‘;’ after class definition
 }
 ^
invalid.cc: In substitution of ‘template< >
template int A< >::m_fn1() [with  =
;  = int]’:
invalid.cc:3:9:   required from here
invalid.cc:3:9: internal compiler error: Segmentation fault
   m_fn1()
 ^
0xd7d93f crash_signal
../../gcc/toplev.c:333
0x731f03 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
../../gcc/tree.h:3147
0x731f03 pop_nested_class()
../../gcc/cp/class.c:7785
0x6f6ede instantiate_template_1
../../gcc/cp/pt.c:17400
0x6f6ede instantiate_template(tree_node*, tree_node*, int)
../../gcc/cp/pt.c:17449
0x7084d7 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
../../gcc/cp/pt.c:17808
0x66ddd0 add_template_candidate_real
../../gcc/cp/call.c:3110
0x66eb2c add_template_candidate
../../gcc/cp/call.c:3188
0x66eb2c add_candidates
../../gcc/cp/call.c:5361
0x66f3af build_new_method_call_1
../../gcc/cp/call.c:8312
0x66f3af build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int)
../../gcc/cp/call.c:8511
0x784522 cp_parser_postfix_expression
../../gcc/cp/parser.c:6875
0x78205c cp_parser_unary_expression
../../gcc/cp/parser.c:7986
0x78c097 cp_parser_cast_expression
../../gcc/cp/parser.c:8663
0x78c65b cp_parser_binary_expression
../../gcc/cp/parser.c:8764
0x78cf20 cp_parser_assignment_expression
../../gcc/cp/parser.c:9051
0x78f84a cp_parser_expression
../../gcc/cp/parser.c:9220
0x78fdf3 cp_parser_expression_statement
../../gcc/cp/parser.c:10681
0x79f156 cp_parser_statement
../../gcc/cp/parser.c:10532
0x79fb3c cp_parser_statement_seq_opt
../../gcc/cp/parser.c:10804

GCC 6.1 works fine.

Martin

[Bug tree-optimization/71120] [6/7 Regression] Aliasing "struct sockaddr_storage" produces invalid code due to SRA

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71120

--- Comment #5 from Richard Biener  ---
https://sourceware.org/bugzilla/show_bug.cgi?id=20111

[Bug fortran/70856] [6/7 Regression] ICE with -fopenacc in get_constraint_for_ssa_var, at tree-ssa-structalias.c:2952

2016-05-18 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70856

--- Comment #8 from rguenther at suse dot de  ---
On Tue, 17 May 2016, marxin at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70856
> 
> Martin Liška  changed:
> 
>What|Removed |Added
> 
>  CC||marxin at gcc dot gnu.org
> 
> --- Comment #7 from Martin Liška  ---
> (In reply to Richard Biener from comment #6)
> > (In reply to vries from comment #5)
> > > before icf, we have:
> > > ...
> > >   static real(kind=4) A.4[2] = {1.0e+0, 2.0e+0};
> > >   static real(kind=4) A.1[2] = {1.0e+0, 2.0e+0};
> > > ...
> > > 
> > > Then icf does:
> > > ...
> > > Semantic equality hit:A.4->A.1
> > > Assembler symbol names:A.4.3435->A.1.3429
> > > Unified; Variable alias has been created.
> > > ...
> > > 
> > > And after icf, we have:
> > > ...
> > >   static real(kind=4) A.4[2] = {1.0e+0, 2.0e+0};
> > >   static real(kind=4) A.1[2];
> > > ...
> > > 
> > > What openacc does, is run ipa-pta before and after icf.
> > > 
> > > The compilation succeeds with -fno-ipa-icf.
> > 
> > Hmm, indeed running ICF after IPA PTA invalidates points-to info (eventually
> > even causing wrong-code).  There is nothing ICF can do here (it would need
> > to adjust all points-to bitmaps).
> > 
> > Note that this is true also for non-IPA PTA info.
> > 
> > The wrong-code possibilities (given that we only merge readonly decls in 
> > ICF)
> > restrict themselves to equality/inequality compares which constitute an area
> > in ICF that is fishy anyway.
> > 
> > That said - if ICF would adjust DECL_PT_UID then a testcase like
> > 
> > static const int a[] = { 1, 2, 3, 4 };
> > static const int b[] = { 1, 2, 3, 4 };
> > 
> > bool isA (int *p) { return p == a; }
> > bool isB (int *p) { return p == b; }
> > int main()
> > {
> >   if (! (isA (a) || isB (a)))
> > abort (); 
> > }
> 
> In the following sample, we do not merge because of:
> "Not unifying; adress of original and alias may be compared."
> 
> > 
> > could start to abort (it's a bit tricky and would involve some disabling
> > of some CCP I guess).
> > 
> > Honza, Martin - I suppose if we start to comare DECL_PT_UID in ICF then
> > this effectively disables ICF of variables.  Any ideas besides adjusting
> > DECL_PT_UID in ICF and hoping for the best (on the wrong-code issue)?
> 
> I would expect that we'll kill majority of merges of variables.
> Well, using the obvious patch:
> 
> diff --git a/gcc/ipa-icf.c b/gcc/ipa-icf.c
> index dda5cac..3c04b5a 100644
> --- a/gcc/ipa-icf.c
> +++ b/gcc/ipa-icf.c
> @@ -2258,6 +2258,8 @@ sem_variable::merge (sem_item *alias_item)
> 
>varpool_node::create_alias (alias_var->decl, decl);
>alias->resolve_alias (original);
> +  if (DECL_PT_UID_SET_P (original->decl))
> +   SET_DECL_PT_UID (alias->decl, DECL_PT_UID (original->decl));
> 
>if (dump_file)
> fprintf (dump_file, "Unified; Variable alias has been created.\n\n");
> 
> The ICE has gone. However, I can't imagine if it can have any negative
> consequences?

If ICF made sure the decls didn't have their address taken it doesn't
have any negative consequence.

Richard.

[Bug tree-optimization/71168] [7 Regression] ICE in find_uses_to_rename_use (tree-ssa-loop-manip.c:379)

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71168

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-05-18
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |7.0
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
Mine.  Probably some odd oversight.

[Bug fortran/70856] [6/7 Regression] ICE with -fopenacc in get_constraint_for_ssa_var, at tree-ssa-structalias.c:2952

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70856

--- Comment #9 from Martin Liška  ---
Great, thus I'm going to test the suggested patch and will send it to ML.

[Bug tree-optimization/63586] x+x+x+x -> 4*x in gimple

2016-05-18 Thread kugan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63586

--- Comment #9 from kugan at gcc dot gnu.org ---
Author: kugan
Date: Wed May 18 07:50:05 2016
New Revision: 236359

URL: https://gcc.gnu.org/viewcvs?rev=236359&root=gcc&view=rev
Log:
Adding the testcase which was not addaed as part of r236356.
gcc/testsuite/ChangeLog:

2016-05-17  Kugan Vivekanandarajah  

PR middle-end/63586
* gcc.dg/tree-ssa/pr63586-2.c: New test.
* gcc.dg/tree-ssa/pr63586.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr63586-2.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr63586.c

[Bug c++/71166] [6/7 Regression] ICE with nested constexpr/initializer

2016-05-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71166

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org,
   ||nathan at gcc dot gnu.org
   Target Milestone|--- |6.2

--- Comment #2 from Jakub Jelinek  ---
Yes, it is indeed r235033.
I have no idea how is constexpr handling meant to work vs. gimplification
though, perhaps this is also related to PR68949.
What happens in this PR is that we process some constexpr stuff, then gimplify
MakeFoo and then process further constexpr stuff.  But gimplification is
destructive, destroys the individual parts of DECL_SAVED_TREE as well as clears
DECL_SAVED_TREE at the end.

[Bug c++/71147] [6 Regression] Flexible array member wrongly rejected in template

2016-05-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71147

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-05-18
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org,
   ||msebor at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Jakub Jelinek  ---
I believe this started with r233126.

[Bug tree-optimization/71168] [7 Regression] ICE in find_uses_to_rename_use (tree-ssa-loop-manip.c:379)

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71168

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Wed May 18 08:10:20 2016
New Revision: 236361

URL: https://gcc.gnu.org/viewcvs?rev=236361&root=gcc&view=rev
Log:
2016-05-18  Richard Biener  

PR tree-optimization/71168
* tree-loop-distribution.c (distribute_loop): Move *destroy_p
initialization earlier.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr71168.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-loop-distribution.c

[Bug tree-optimization/71168] [7 Regression] ICE in find_uses_to_rename_use (tree-ssa-loop-manip.c:379)

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71168

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Richard Biener  ---
Fixed.

[Bug target/71151] [avr] -fmerge-constants and -fdata-sections/-ffunction-sections results in string constants in .progmem.gcc_sw section

2016-05-18 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71151

Georg-Johann Lay  changed:

   What|Removed |Added

   Keywords||wrong-code
 CC||gjl at gcc dot gnu.org

--- Comment #2 from Georg-Johann Lay  ---
Cannot reproduce this on 5.x.

The avr BE tries to apply -fdata-sections to data in progmem in a similar way
like -fdata-sections acts on data in RAM.  A dedicated option like
-mprogmem-sections was not possible because of the terrible section
implementation in varasm.c.

Presumably, the problem is TARGET_ASM_FUNCTION_RODATA_SECTION in avr.c.

Maybe we'll have to give up the feature alltogether and drop the .progmem.var
subsections and return to one bulk .progmem.data again.

[Bug target/71161] [7 Regression] Lots of ASAN and libgo runtime FAILs after r236090

2016-05-18 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71161

--- Comment #8 from Uroš Bizjak  ---
Old glibc misaligns the stack on 32bit targets.

In my case (Centos 5.11, glibc 2.5), looking into:

FAIL: go.go-torture/execute/array-1.go execution,  -O0 

Starting program: /home/uros/test/a.out 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0xf7997b9b in find_address_ranges (state=state@entry=0xf702d000,
base_address=base_address@entry=4144750592, 
unit_buf=unit_buf@entry=0xab48, dwarf_str=0xf6708ef8 "pause_total_ns",
dwarf_str_size=676857, dwarf_ranges=0xf6a51baf "R", 
dwarf_ranges_size=277408, is_bigendian=0, error_callback=0xf75d59d0
, data=0xb0ec, u=0xf6bfce38, addrs=0xab18)
at ../../../../git/gcc/libbacktrace/dwarf.c:1285
1285  for (i = 0; i < abbrev->num_attrs; ++i)
(gdb) disass
Dump of assembler code for function find_address_ranges:
   ...
   0xf7997b64 <+148>:   movl   $0x0,0x44(%esp)
   0xf7997b6c <+156>:   movl   $0x0,0x4c(%esp)
   0xf7997b74 <+164>:   lea0x90(%esp),%edi
   0xf7997b7b <+171>:   movl   $0x0,0x50(%esp)
   0xf7997b83 <+179>:   movl   $0x0,0x58(%esp)
   0xf7997b8b <+187>:   movl   $0x0,0x30(%esp)
   0xf7997b93 <+195>:   movl   $0x0,0x48(%esp)
=> 0xf7997b9b <+203>:   movaps %xmm0,0x20(%esp)
   0xf7997ba0 <+208>:   mov%ebx,(%esp)
   0xf7997ba3 <+211>:   movaps %xmm0,0x10(%esp)
   0xf7997ba8 <+216>:   jmp0xf7997bdf 

(gdb) p $esp
$1 = (void *) 0xa9c8

#0  0xf7997b9b in find_address_ranges (state=state@entry=0xf702d000,
base_address=base_address@entry=4144750592, 
unit_buf=unit_buf@entry=0xab48, dwarf_str=0xf6708ef8 "pause_total_ns",
dwarf_str_size=676857, dwarf_ranges=0xf6a51baf "R", 
dwarf_ranges_size=277408, is_bigendian=0, error_callback=0xf75d59d0
, data=0xb0ec, u=0xf6bfce38, addrs=0xab18)
at ../../../../git/gcc/libbacktrace/dwarf.c:1285
#1  0xf799a416 in build_address_map (addrs=0xab18, data=,
error_callback=0xf75d59d0 , is_bigendian=0, 
dwarf_str_size=676857, dwarf_str=0xf6708ef8 "pause_total_ns",
dwarf_ranges_size=277408, dwarf_ranges=0xf6a51baf "R", 
dwarf_abbrev_size=247375, dwarf_abbrev=0xf638cf47
"\001\021\001%\016\023\v\003\016\033\016\021\001\022\006\020\027", 
dwarf_info_size=3526911, dwarf_info=0xf602fe48 "3\034",
base_address=4144750592, state=0xf702d000)
at ../../../../git/gcc/libbacktrace/dwarf.c:1498
#2  build_dwarf_data (data=, error_callback=0xf75d59d0
, is_bigendian=0, dwarf_str_size=676857, 
dwarf_str=0xf6708ef8 "pause_total_ns", dwarf_ranges_size=277408,
dwarf_ranges=0xf6a51baf "R", dwarf_abbrev_size=247375, 
dwarf_abbrev=0xf638cf47
"\001\021\001%\016\023\v\003\016\033\016\021\001\022\006\020\027",
dwarf_line_size=468966, 
dwarf_line=0xf63c9596 "\350\001", dwarf_info_size=3526911,
dwarf_info=0xf602fe48 "3\034", base_address=4144750592, state=0xf702d000)
at ../../../../git/gcc/libbacktrace/dwarf.c:2932
#3  backtrace_dwarf_add (state=0xf702d000, base_address=4144750592,
dwarf_info=0xf602fe48 "3\034", dwarf_info_size=3526911, 
dwarf_line=0xf63c9596 "\350\001", dwarf_line_size=468966, 
dwarf_abbrev=0xf638cf47
"\001\021\001%\016\023\v\003\016\033\016\021\001\022\006\020\027",
dwarf_abbrev_size=247375, 
dwarf_ranges=0xf6a51baf "R", dwarf_ranges_size=277408, dwarf_str=0xf6708ef8
"pause_total_ns", dwarf_str_size=676857, is_bigendian=0, 
error_callback=0xf75d59d0 , data=,
fileline_fn=0xad50)
at ../../../../git/gcc/libbacktrace/dwarf.c:2992
#4  0xf799bdb3 in elf_add (state=, descriptor=5,
base_address=4144750592, error_callback=0xf75d59d0 , 
data=0xb0ec, fileline_fn=0xad50, found_sym=0xadf8,
found_dwarf=0xad54, exe=0)
at ../../../../git/gcc/libbacktrace/elf.c:817
#5  0xf799be80 in phdr_callback (info=0xad94, size=40, pdata=0xae04) at
../../../../git/gcc/libbacktrace/elf.c:902
#6  0x0035c2ea in dl_iterate_phdr () from /lib/libc.so.6
#7  0xf799bf59 in backtrace_initialize (state=0xf702d000, descriptor=, error_callback=0xf75d59d0 , 
data=0xb0ec, fileline_fn=0xae78) at
../../../../git/gcc/libbacktrace/elf.c:943
#8  0xf799a9b7 in fileline_initialize (state=state@entry=0xf702d000,
error_callback=error_callback@entry=0xf75d59d0 , 
data=data@entry=0xb0ec) at
../../../../git/gcc/libbacktrace/fileline.c:136
#9  0xf799aa7a in backtrace_pcinfo (state=0xf702d000, pc=4150090376,
callback=0xf75d5760 , 
error_callback=0xf75d59d0 , data=0xb0ec) at
../../../../git/gcc/libbacktrace/fileline.c:170
#10 0xf799aff4 in unwind (context=0xaf20, vdata=0xb094) at
../../../../git/gcc/libbacktrace/backtrace.c:91
#11 0xf70933da in _Unwind_Backtrace (trace=0xf799af90 ,
trace_argument=0xb094) at ../../../../git/gcc/libgcc/unwind.inc:295
#12 0xf799b0bb in backtrace_full (state=0xf702d000, skip=0, callback=0xf75d5760
, error_callback=0xf75d59d0 , 
data=0xb0ec) at ../../../../git/gcc/libbacktrace

[Bug tree-optimization/71142] [6/7 Regression] ICE: Segmentation fault in ssa_default_def

2016-05-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71142

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||jakub at gcc dot gnu.org,
   ||spop at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek  ---
Graphite bug.

[Bug c++/71117] [6/7 Regression] Overeager application of conversion to function pointer during overload resolution of call to function object

2016-05-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71117

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
The second testcase started to be accepted with r229210 change and similarly
r229209 accepted the first testcase, while r229210 rejects it.

[Bug c++/71117] [6/7 Regression] Overeager application of conversion to function pointer during overload resolution of call to function object

2016-05-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71117

--- Comment #3 from Jakub Jelinek  ---
BTW, the first testcase has been rejected at gcc-5-branch branch point, only
got accepted later on in r226642 (and that change has been later backported).

[Bug c++/71100] [6/7 regression] Internal compiler error while calling a pointer to member function that throws

2016-05-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71100

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Started with r232167.

[Bug target/71161] [7 Regression] Lots of ASAN and libgo runtime FAILs after r236090

2016-05-18 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71161

--- Comment #9 from Uroš Bizjak  ---
Following patch solves all failures:

--cut here--
diff --git a/libbacktrace/elf.c b/libbacktrace/elf.c
index f85ac65..81ba344 100644
--- a/libbacktrace/elf.c
+++ b/libbacktrace/elf.c
@@ -866,6 +866,9 @@ struct phdr_data
libraries.  */

 static int
+#ifdef __i386__
+__attribute__ ((__force_align_arg_pointer__))
+#endif
 phdr_callback (struct dl_phdr_info *info, size_t size ATTRIBUTE_UNUSED,
   void *pdata)
 {
--cut here--

[Bug c++/71164] tree check fail at cp/pt.c:12961

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71164

--- Comment #2 from Martin Liška  ---
Reduces test-case:

template  class A {
  template  void m_fn1() { m_fn1(); }
};

g++ bug.cc -c -std=c++11
bug.cc: In substitution of ‘template, class Preconditioner>
template void A<, Preconditioner>::m_fn1() [with
 = ; char  = ;
Preconditioner = ]’:
bug.cc:2:58:   required from here
bug.cc:2:13: internal compiler error: tree check: accessed elt 2 of tree_vec
with 1 elts in tsubst, at cp/pt.c:12961
   template  void m_fn1() { m_fn1(); }
 ^
0x10052c5 tree_vec_elt_check_failed(int, int, char const*, int, char const*)
../../gcc/tree.c:9950
0x716ef9 tree_vec_elt_check(tree_node const*, int, char const*, int, char
const*)
../../gcc/tree.h:3472
0x6de00a tsubst(tree_node*, tree_node*, int, tree_node*)
../../gcc/cp/pt.c:12961
0x6fa535 type_unification_real
../../gcc/cp/pt.c:18488
0x7080aa fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, bool, bool)
../../gcc/cp/pt.c:17753
0x66ddd0 add_template_candidate_real
../../gcc/cp/call.c:3110
0x66eb2c add_template_candidate
../../gcc/cp/call.c:3188
0x66eb2c add_candidates
../../gcc/cp/call.c:5361
0x66f3af build_new_method_call_1
../../gcc/cp/call.c:8312
0x66f3af build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int)
../../gcc/cp/call.c:8511
0x784522 cp_parser_postfix_expression
../../gcc/cp/parser.c:6875
0x78205c cp_parser_unary_expression
../../gcc/cp/parser.c:7986
0x78c097 cp_parser_cast_expression
../../gcc/cp/parser.c:8663
0x78c65b cp_parser_binary_expression
../../gcc/cp/parser.c:8764
0x78cf20 cp_parser_assignment_expression
../../gcc/cp/parser.c:9051
0x78f84a cp_parser_expression
../../gcc/cp/parser.c:9220
0x78fdf3 cp_parser_expression_statement
../../gcc/cp/parser.c:10681
0x79f156 cp_parser_statement
../../gcc/cp/parser.c:10532
0x79fb3c cp_parser_statement_seq_opt
../../gcc/cp/parser.c:10804
0x79fc4f cp_parser_compound_statement
../../gcc/cp/parser.c:10758

While GCC 5.3.1 (g++ bug.cc -std=c++11 -c) works fine.

Martin

[Bug target/71161] [7 Regression] Lots of ASAN and libgo runtime FAILs after r236090

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71161

Richard Biener  changed:

   What|Removed |Added

 CC||schwab at gcc dot gnu.org

--- Comment #10 from Richard Biener  ---
Thanks for tracking it down!  I'm putting this workaround in my tree for the
next testing.  I've briefly looked into the dl_iterate_phdr history but can't
find
a fix so it might be a miscompilation of the system compiler building the old
glibc (gcc 4.3 here)?

[Bug target/71161] [7 Regression] Lots of ASAN and libgo runtime FAILs after r236090

2016-05-18 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71161

--- Comment #11 from Uroš Bizjak  ---
(In reply to Richard Biener from comment #10)
> Thanks for tracking it down!  I'm putting this workaround in my tree for the
> next testing.  I've briefly looked into the dl_iterate_phdr history but
> can't find
> a fix so it might be a miscompilation of the system compiler building the old
> glibc (gcc 4.3 here)?

I doubt this, my CentOS 5.11 has ancient gcc-4.1.2-55 as a system compiler, and
its glibc-2.5 has the same problem. Nevertheless, glibc people should look at
this problem from their perspective.

I will propose the patch later today, it robustifies the compiler noticeably.

[Bug c++/71164] tree check fail at cp/pt.c:12961

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71164

--- Comment #3 from Martin Liška  ---
Started with r236221:

Author: jason 
Date:   Fri May 13 19:18:35 2016 +

Fix type-dependence and the current instantiation.

PR c++/10200
PR c++/69753
* pt.c (tsubst_decl): Use uses_template_parms.
(instantiate_template_1): Handle non-dependent calls in templates.
(value_dependent_expression_p): Handle BASELINK, FUNCTION_DECL.
(type_dependent_expression_p): Only consider innermost template args.
(dependent_template_arg_p): Check enclosing class of a template here.
(dependent_template_p): Not here.
(type_dependent_object_expression_p): New.
* typeck.c (finish_class_member_access_expr): Use it.
* parser.c (cp_parser_postfix_expression): Use it.
(cp_parser_postfix_dot_deref_expression): Use it.  Use comptypes
to detect the current instantiation.
(cp_parser_lookup_name): Really implement DR 141.
* search.c (lookup_field_r): Prefer a dependent using-declaration.
(any_dependent_bases_p): Split out from...
* name-lookup.c (do_class_using_decl): ...here.
* call.c (build_new_method_call_1): Use it.
* semantics.c (finish_call_expr): 'this' doesn't make a call dependent.
* tree.c (non_static_member_function_p): Remove.
* typeck2.c (build_x_arrow): Use dependent_scope_p.

Martin

[Bug c++/71169] [7 Regression] ICE on invalid C++ code in pop_nested_class (cp/class.c:7785)

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71169

--- Comment #1 from Martin Liška  ---
Started with r236221:

Author: jason 
Date:   Fri May 13 19:18:35 2016 +

Fix type-dependence and the current instantiation.

PR c++/10200
PR c++/69753
* pt.c (tsubst_decl): Use uses_template_parms.
(instantiate_template_1): Handle non-dependent calls in templates.
(value_dependent_expression_p): Handle BASELINK, FUNCTION_DECL.
(type_dependent_expression_p): Only consider innermost template args.
(dependent_template_arg_p): Check enclosing class of a template here.
(dependent_template_p): Not here.
(type_dependent_object_expression_p): New.
* typeck.c (finish_class_member_access_expr): Use it.
* parser.c (cp_parser_postfix_expression): Use it.
(cp_parser_postfix_dot_deref_expression): Use it.  Use comptypes
to detect the current instantiation.
(cp_parser_lookup_name): Really implement DR 141.
* search.c (lookup_field_r): Prefer a dependent using-declaration.
(any_dependent_bases_p): Split out from...
* name-lookup.c (do_class_using_decl): ...here.
* call.c (build_new_method_call_1): Use it.
* semantics.c (finish_call_expr): 'this' doesn't make a call dependent.
* tree.c (non_static_member_function_p): Remove.
* typeck2.c (build_x_arrow): Use dependent_scope_p.

Martin

[Bug c++/71100] [6/7 regression] Internal compiler error while calling a pointer to member function that throws

2016-05-18 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71100

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
Created attachment 38512
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38512&action=edit
gcc7-pr71100.patch

Untested fix.

[Bug target/71161] [7 Regression] Lots of ASAN and libgo runtime FAILs after r236090

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71161

--- Comment #12 from Richard Biener  ---
I don't see anything wrong btw. the following contains all esp modifications
and indirect calls.

00115d40 :
  115d40:   55  push   %ebp
  115d41:   89 e5   mov%esp,%ebp
  115d43:   57  push   %edi
  115d44:   56  push   %esi
  115d45:   53  push   %ebx
  115d46:   e8 14 0d f0 ff  call   16a5f <__i686.get_pc_thunk.bx>
  115d4b:   81 c3 b5 92 05 00   add$0x592b5,%ebx
  115d51:   83 ec 50sub$0x50,%esp
  115d54:   8b 93 c8 fe ff ff   mov-0x138(%ebx),%edx
  115d5a:   8d 82 c4 04 00 00   lea0x4c4(%edx),%eax
  115d60:   89 04 24mov%eax,(%esp)
  115d63:   ff 92 e0 07 00 00   call   *0x7e0(%edx)
...
  115e2b:   c7 44 24 04 28 00 00movl   $0x28,0x4(%esp)
  115e32:   00 
  115e33:   89 3c 24mov%edi,(%esp)
  115e36:   89 4c 24 08 mov%ecx,0x8(%esp)
  115e3a:   ff 55 08call   *0x8(%ebp)
...
  115ee8:   89 04 24mov%eax,(%esp)
  115eeb:   ff 92 e4 07 00 00   call   *0x7e4(%edx)
  115ef1:   8b 45 b4mov-0x4c(%ebp),%eax
  115ef4:   83 c4 50add$0x50,%esp
  115ef7:   5b  pop%ebx
  115ef8:   5e  pop%esi
  115ef9:   5f  pop%edi
  115efa:   5d  pop%ebp
  115efb:   c3  ret

so unless the locking stuff (I'm looking at head sources, the above is old
assembly) misaligns the stack the above is fine.

[Bug target/71161] [7 Regression] Lots of ASAN and libgo runtime FAILs after r236090

2016-05-18 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71161

--- Comment #13 from rguenther at suse dot de  ---
On Wed, 18 May 2016, ubizjak at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71161
> 
> --- Comment #11 from Uroš Bizjak  ---
> (In reply to Richard Biener from comment #10)
> > Thanks for tracking it down!  I'm putting this workaround in my tree for the
> > next testing.  I've briefly looked into the dl_iterate_phdr history but
> > can't find
> > a fix so it might be a miscompilation of the system compiler building the 
> > old
> > glibc (gcc 4.3 here)?
> 
> I doubt this, my CentOS 5.11 has ancient gcc-4.1.2-55 as a system compiler, 
> and
> its glibc-2.5 has the same problem. Nevertheless, glibc people should look at
> this problem from their perspective.
> 
> I will propose the patch later today, it robustifies the compiler noticeably.

Agreed.

[Bug target/71151] [avr] -fmerge-constants and -fdata-sections/-ffunction-sections results in string constants in .progmem.gcc_sw section

2016-05-18 Thread senthil.thecoder at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71151

--- Comment #3 from Senthil Kumar Selvaraj  
---
Yeah, it's a 6.x thing. There's a commit that changes varasm.c from using
targetm.asm_out.mergeable_rodata_prefix to a function call to
targetm.asm_out.function_rodata_section hook if the section category is
SECCAT_RODATA_MERGE_STR. So avr_asm_function_rodata_section now gets called for
string literals inside functions, not just jumptables.

I'm trying out a fix that propagates the section category down to the target
hook and have the avr backend use it to distinguish between jumptables and
other data.

[Bug c++/71145] Alpha: Error: No lda !gpdisp!278 was found

2016-05-18 Thread mcree at orcon dot net.nz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71145

--- Comment #5 from Michael Cree  ---
Yes, that patch fixes it for me.

[Bug tree-optimization/71170] New: [7 Regression] ICE in rewrite_expr_tree, at tree-ssa-reassoc.c:3898

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170

Bug ID: 71170
   Summary: [7 Regression] ICE in rewrite_expr_tree, at
tree-ssa-reassoc.c:3898
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

After r236356, I see various ICE in test-suite on x86_64:

./xgcc -B.
/home/marxin/Programming/gcc3/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c -c -O1
-fwrapv
/home/marxin/Programming/gcc3/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c: In
function ‘f’:
/home/marxin/Programming/gcc3/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c:8:1:
internal compiler error: in rewrite_expr_tree, at tree-ssa-reassoc.c:3898
 f (int s, long c)
 ^
0x103 rewrite_expr_tree
../../gcc/tree-ssa-reassoc.c:3897
0x1044241 rewrite_expr_tree
../../gcc/tree-ssa-reassoc.c:3862
0x1047c72 reassociate_bb
../../gcc/tree-ssa-reassoc.c:5249
0x1047e08 reassociate_bb
../../gcc/tree-ssa-reassoc.c:5278
0x1048346 do_reassoc
../../gcc/tree-ssa-reassoc.c:5392
0x104865b execute_reassoc
../../gcc/tree-ssa-reassoc.c:5479
0x104876d execute
../../gcc/tree-ssa-reassoc.c:5518

Thanks

[Bug tree-optimization/71170] [7 Regression] ICE in rewrite_expr_tree, at tree-ssa-reassoc.c:3898

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170

--- Comment #1 from Martin Liška  ---
Also seen on a tester:
https://gcc.gnu.org/ml/gcc-regression/2016-05/msg00248.html

[Bug ipa/71146] [7 Regression] error: __builtin_unreachable or __builtin_trap call with arguments

2016-05-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71146

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Marek Polacek  ---
Fixed.

[Bug c++/70572] [4.9/5/6/7 Regression] ICE on code with decltype (auto) on x86_64-linux-gnu in digest_init_r, at cp/typeck2.c:1103 with -std=c++14

2016-05-18 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70572

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com

--- Comment #2 from Paolo Carlini  ---
Mine.

[Bug tree-optimization/71031] [6/7 Regression] ICE in extract_range_from_binary_expr_1, at tree-vrp.c:2535 w/ -Os

2016-05-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71031

--- Comment #4 from Marek Polacek  ---
Here, we have [1, od_5] + UINT_MAX on type unsigned, which wraps, so we try to
turn this into an anti-range [*].  But that is not possible, the anti-range
doesn't exist (is empty) so we should drop to varying, I think.

[*] Same as e.g. if we have unsigned i with range [2,4], then for i - 4 we have
an anti-range ~[1, UINT_MAX - 2].

[Bug ipa/71015] [7 Regression] ICE in inline_small_functions, at ipa-inline.c:1881

2016-05-18 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71015

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Markus Trippelsdorf  ---
Seems to be fixed. Closing.

[Bug tree-optimization/71170] [7 Regression] ICE in rewrite_expr_tree, at tree-ssa-reassoc.c:3898

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug tree-optimization/71170] [7 Regression] ICE in rewrite_expr_tree, at tree-ssa-reassoc.c:3898

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170

--- Comment #2 from Martin Liška  ---
I have a candidate patch, testing...

[Bug tree-optimization/71031] [6/7 Regression] ICE in extract_range_from_binary_expr_1, at tree-vrp.c:2535 w/ -Os

2016-05-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71031

--- Comment #5 from Marek Polacek  ---
I don't understand how could r231098 cause this though.  If I put breakpoints
on type_in_anonymous_namespace_p / type_with_linkage_p / odr_type_p, it doesn't
stop at them so...

[Bug c++/71169] [7 Regression] ICE on invalid C++ code in pop_nested_class (cp/class.c:7785)

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71169

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug tree-optimization/71170] [7 Regression] ICE in rewrite_expr_tree, at tree-ssa-reassoc.c:3898

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170

--- Comment #3 from Martin Liška  ---
(In reply to Martin Liška from comment #1)
> Also seen on a tester:
> https://gcc.gnu.org/ml/gcc-regression/2016-05/msg00248.html

This is unrelated as seen:
https://gcc.gnu.org/ml/gcc-regression/2016-05/msg00258.html

[Bug fortran/70856] [6/7 Regression] ICE with -fopenacc in get_constraint_for_ssa_var, at tree-ssa-structalias.c:2952

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70856

--- Comment #10 from Martin Liška  ---
Author: marxin
Date: Wed May 18 11:48:50 2016
New Revision: 236375

URL: https://gcc.gnu.org/viewcvs?rev=236375&root=gcc&view=rev
Log:
Set DECL_PT_UID for merged variables in IPA ICF (PR70856).

PR fortran/70856
* ipa-icf.c (sem_variable::merge): Set DECL_PT_UID for
merged variables.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-icf.c

[Bug tree-optimization/71170] [7 Regression] ICE in rewrite_expr_tree, at tree-ssa-reassoc.c:3898

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170

--- Comment #4 from Martin Liška  ---
Created attachment 38513
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38513&action=edit
Candidate patch

I'm testing the attached patch.

[Bug c++/68252] [5 regression] left operand of shift expression, while we shift > 0 integer

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68252

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

--- Comment #4 from Richard Biener  ---
Yes, using an unsigned left-shift looks good.

[Bug ipa/68470] [4.9/5 Regression] Internal Compiler Error observed by g++-4.9.2 and a few other versions (reported to Debian)

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68470

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/68578] [5 Regression] ICE on invalid template declaration and instantiation

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68578

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/68669] [5 regression] -Wunused-variable in anonymous namespace is not correctly supressed by #pragmas

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68669

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/68727] [5/6/7 regression] invalid offsetof expressions accepted

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68727

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-05-18
  Known to work||4.9.3
Summary|[5 regression] invalid  |[5/6/7 regression] invalid
   |offsetof expressions|offsetof expressions
   |accepted|accepted
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.

[Bug c++/69131] [4.9 Regression] default constructor of union incorrectly deleted

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69131

Richard Biener  changed:

   What|Removed |Added

   Keywords||rejects-valid
   Priority|P3  |P2
  Known to work||5.4.0
Summary|[4.9/5 Regression] default  |[4.9 Regression] default
   |constructor of union|constructor of union
   |incorrectly deleted |incorrectly deleted
  Known to fail|5.2.0   |5.3.0

[Bug rtl-optimization/71148] [7 Regression] Compile time hog w/ -O3 -funroll-loops

2016-05-18 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71148

--- Comment #4 from Ilya Enkovich  ---
(In reply to Richard Biener from comment #2)
> thus cleanup_cfg updating dominance info.  Note the et_splay operation itself
> is this slow (another reason for this may be a corrupt et forest after the
> recent x86 backend "issues" with dominance info).

So cleanup_cfg shouldn't be called with invalidated dominance info.  Therefore
we need two checks for invalidated dominance info.  One before cleanup_cfg and
onr after, right?  This patch fixes testcase compilation:

@@ -7630,6 +7636,12 @@ rest_of_handle_cse2 (void)

   delete_trivially_dead_insns (get_insns (), max_reg_num ());

+  /* Check if we need to free dominance info before cleanup_cfg
+ because it may become really slow in case of invalid
+ dominance info.  */
+  if (cse_cfg_altered && dom_info_available_p (CDI_DOMINATORS))
+free_dominance_info (CDI_DOMINATORS);
+
   if (tem == 2)
 {
   timevar_push (TV_JUMP);

I wonder why we try to update dominance info in cleanup_cfg if as PR71084 shows
it still may invalidate it.

[Bug target/69264] [4.9/5/6/7 regression] ICE building spidermonkey -mcpu=970 -maltivec -O3: rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:4350

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69264

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
Summary|[4.9/5 regression] ICE  |[4.9/5/6/7 regression] ICE
   |building spidermonkey   |building spidermonkey
   |-mcpu=970 -maltivec -O3:|-mcpu=970 -maltivec -O3:
   |rs6000_builtin_vectorizatio |rs6000_builtin_vectorizatio
   |n_cost, at  |n_cost, at
   |config/rs6000/rs6000.c:4350 |config/rs6000/rs6000.c:4350

[Bug middle-end/69400] [5 Regression] wrong code with -O and int128

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69400

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Component|tree-optimization   |middle-end

[Bug target/69895] [5 Regression] dependency of gcc-plugin.h not installed on m68k-linux-gnu

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69895

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug rtl-optimization/70263] [4.9/5 Regression] ICE at -O1 and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (segmentation fault)

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70263

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/70336] [5 regression] Incorrect Wconversion warning

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70336

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||4.8.5, 6.1.0

[Bug c++/70338] [5 Regression] ICE combining debug symbols, range-for in lambda in function template accessing captured variable-size array

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70338

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/70452] [5 Regression] Regression in C++ parsing performance between 4.9.3 and 5.3.1

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70452

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||4.9.3, 6.1.0

[Bug c++/70494] [5 regression] Internal Compiler Error: Capturing an array of vectors in a lambda

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70494

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Priority|P3  |P2
  Known to work||6.1.0
  Known to fail||5.3.0

[Bug c++/70528] [5 Regression] bogus error: constructor required before non-static data member

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70528

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||6.1.0
 Depends on||70690
  Known to fail||5.3.0


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70690
[Bug 70690] [6/7 Regression] r235002 miscompiles tcmalloc

[Bug tree-optimization/70623] [4.9/5 Regression] ICE in compute_antic at -O2

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70623

--- Comment #9 from Richard Biener  ---
*** Bug 70625 has been marked as a duplicate of this bug. ***

[Bug c++/70709] [4.9/5/6/7 Regression] gcc hangs on valid C++ code on x86_64-linux-gnu

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70709

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug rtl-optimization/70625] [4.9/5 Regression] Memory exhaustion when building specific snippet at -O2

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70625

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #6 from Richard Biener  ---
Duplicate.

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

[Bug c++/70735] [5/6/7 Regression] problem combining std::function, generic lambdas and static variables

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70735

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug tree-optimization/70754] [5/6/7 Regression] ICE during predictive commoning

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70754

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug target/70903] [4.9/5/6/7 Regression] wrong code with bfi @ aarch64 with -Os

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70903

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug rtl-optimization/71119] [4.9/5/6/7 Regression] ftoit instruction not emitted for double -> long bitcast

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71119

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P4

[Bug rtl-optimization/70978] [5 Regression] internal compiler error: in assign_by_spills, at lra-assigns.c:1428 on arm

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70978

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug tree-optimization/71083] [4.9/5/6 Regression] Unaligned bit-field address when predictive commoning

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71083

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug target/70941] [5 Regression] Test miscompiled with -O2.

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70941

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug debug/71171] New: [6/7 Regression] Conditional jump or move depends on uninitialised value(s) in can_be_stored_compactly_p (line-map.c:148)

2016-05-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71171

Bug ID: 71171
   Summary: [6/7 Regression] Conditional jump or move depends on
uninitialised value(s) in can_be_stored_compactly_p
(line-map.c:148)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Hello.

Following test-case uses an uninitialized memory:
gcc/testsuite/c-c++-common/goacc/asyncwait-1.c

Reduced test-case:
$ cat tc.c
void f (  void) {
#pragma acc parallel copyin  copy  async (*) 

$ valgrind --trace-children=yes gcc tc.c -fopenacc

==29528== Conditional jump or move depends on uninitialised value(s)
==29528==at 0x10712FE: can_be_stored_compactly_p (line-map.c:148)
==29528==by 0x10712FE: get_combined_adhoc_loc(line_maps*, unsigned int,
source_range, void*) (line-map.c:190)
==29528==by 0xBE1037: COMBINE_LOCATION_DATA (line-map.h:993)
==29528==by 0xBE1037: make_location(unsigned int, unsigned int, unsigned
int) (tree.c:14045)
==29528==by 0x618F99: c_parser_unary_expression(c_parser*)
(c-parser.c:6846)
==29528==by 0x619F27: c_parser_cast_expression(c_parser*, c_expr*)
(c-parser.c:6759)
==29528==by 0x61A142: c_parser_binary_expression(c_parser*, c_expr*,
tree_node*) (c-parser.c:6568)
==29528==by 0x61ADA5: c_parser_conditional_expression(c_parser*, c_expr*,
tree_node*) (c-parser.c:6339)
==29528==by 0x61B2B0: c_parser_expr_no_commas(c_parser*, c_expr*,
tree_node*) (c-parser.c:6256)
==29528==by 0x61B852: c_parser_expression(c_parser*) (c-parser.c:8443)
==29528==by 0x60EA78: c_parser_oacc_clause_async (c-parser.c:11727)
==29528==by 0x60EA78: c_parser_oacc_all_clauses(c_parser*, omp_clause_mask,
char const*, bool) (c-parser.c:13015)
==29528==by 0x60F7E8: c_parser_oacc_kernels_parallel (c-parser.c:13936)
==29528==by 0x60F7E8: c_parser_omp_construct (c-parser.c:17140)
==29528==by 0x60F7E8: c_parser_pragma(c_parser*, pragma_context, bool*)
(c-parser.c:10207)
==29528==by 0x615FAE: c_parser_compound_statement_nostart(c_parser*)
(c-parser.c:4826)
==29528==by 0x62749E: c_parser_compound_statement(c_parser*)
(c-parser.c:4693)
==29528== 
==29528== Conditional jump or move depends on uninitialised value(s)
==29528==at 0x107136B: get_combined_adhoc_loc(line_maps*, unsigned int,
source_range, void*) (line-map.c:209)
==29528==by 0xBE1037: COMBINE_LOCATION_DATA (line-map.h:993)
==29528==by 0xBE1037: make_location(unsigned int, unsigned int, unsigned
int) (tree.c:14045)
==29528==by 0x618F99: c_parser_unary_expression(c_parser*)
(c-parser.c:6846)
==29528==by 0x619F27: c_parser_cast_expression(c_parser*, c_expr*)
(c-parser.c:6759)
==29528==by 0x61A142: c_parser_binary_expression(c_parser*, c_expr*,
tree_node*) (c-parser.c:6568)
==29528==by 0x61ADA5: c_parser_conditional_expression(c_parser*, c_expr*,
tree_node*) (c-parser.c:6339)
==29528==by 0x61B2B0: c_parser_expr_no_commas(c_parser*, c_expr*,
tree_node*) (c-parser.c:6256)
==29528==by 0x61B852: c_parser_expression(c_parser*) (c-parser.c:8443)
==29528==by 0x60EA78: c_parser_oacc_clause_async (c-parser.c:11727)
==29528==by 0x60EA78: c_parser_oacc_all_clauses(c_parser*, omp_clause_mask,
char const*, bool) (c-parser.c:13015)
==29528==by 0x60F7E8: c_parser_oacc_kernels_parallel (c-parser.c:13936)
==29528==by 0x60F7E8: c_parser_omp_construct (c-parser.c:17140)
==29528==by 0x60F7E8: c_parser_pragma(c_parser*, pragma_context, bool*)
(c-parser.c:10207)
==29528==by 0x615FAE: c_parser_compound_statement_nostart(c_parser*)
(c-parser.c:4826)
==29528==by 0x62749E: c_parser_compound_statement(c_parser*)
(c-parser.c:4693)
==29528== 
==29528== Use of uninitialised value of size 8
==29528==at 0x10A3A93: htab_find_slot_with_hash (hashtab.c:655)
==29528==by 0x10713A4: get_combined_adhoc_loc(line_maps*, unsigned int,
source_range, void*) (line-map.c:220)
==29528==by 0xBE1037: COMBINE_LOCATION_DATA (line-map.h:993)
==29528==by 0xBE1037: make_location(unsigned int, unsigned int, unsigned
int) (tree.c:14045)
==29528==by 0x618F99: c_parser_unary_expression(c_parser*)
(c-parser.c:6846)
==29528==by 0x619F27: c_parser_cast_expression(c_parser*, c_expr*)
(c-parser.c:6759)
==29528==by 0x61A142: c_parser_binary_expression(c_parser*, c_expr*,
tree_node*) (c-parser.c:6568)
==29528==by 0x61ADA5: c_parser_conditional_expression(c_parser*, c_expr*,
tree_node*) (c-parser.c:6339)
==29528==by 0x61B2B0: c_parser_expr_no_commas(c_parser*, c_expr*,
tree_node*) (c-parser.c:6256)
==29528==by 0x61B852: c_parser_expression(c_parser*) (c-parser.c:8443)
==29528==by 0x60EA78: c_parser_oacc_clause_async (c-parser.c:11727)
==29528==by 0x60EA78: c_parser_oacc_all_clauses(c_parser*, omp_clause_mask,
char const

[Bug tree-optimization/71031] [6/7 Regression] ICE in extract_range_from_binary_expr_1, at tree-vrp.c:2535 w/ -Os

2016-05-18 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71031

--- Comment #6 from Marek Polacek  ---
The real culprit is r231097; our cc1 in bisect seed must be wrong.

[Bug target/70809] [AArch64] aarch64_vmls pattern should be rejected if -ffp-contract=off

2016-05-18 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70809

--- Comment #5 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Wed May 18 12:53:32 2016
New Revision: 236386

URL: https://gcc.gnu.org/viewcvs?rev=236386&root=gcc&view=rev
Log:
[AArch64] PR target/70809: Delete aarch64_vmls pattern

2016-05-18  Kyrylo Tkachov  

Backport from mainline
2016-05-17  Kyrylo Tkachov  

PR target/70809
* config/aarch64/aarch64-simd.md (aarch64_vmls): Delete.

* gcc.target/aarch64/pr70809_1.c: New test.


Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/aarch64/pr70809_1.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/aarch64/aarch64-simd.md
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug ipa/70646] [4.9/5/6/7 Regression] Corrupt truncated function

2016-05-18 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646

--- Comment #32 from Martin Jambor  ---
Author: jamborm
Date: Wed May 18 13:04:23 2016
New Revision: 236389

URL: https://gcc.gnu.org/viewcvs?rev=236389&root=gcc&view=rev
Log:
[PR 70646] Store size to inlining predicate conditions

2016-05-18  Martin Jambor  

PR ipa/70646
* ipa-inline.h (condition): New field size.
* ipa-inline-analysis.c (add_condition): New parameter SIZE, use it
for comaprison and store it into the new condition.
(evaluate_conditions_for_known_args): Use condition size to check
access sizes for all but CHANGED conditions.
(unmodified_parm_1): New parameter size_p, store access size into it.
(unmodified_parm): Likewise.
(unmodified_parm_or_parm_agg_item): Likewise.
(eliminated_by_inlining_prob): Pass NULL to unmodified_parm as size_p.
(set_cond_stmt_execution_predicate): Extract access sizes and store
them to conditions.
(set_switch_stmt_execution_predicate): Likewise.
(will_be_nonconstant_expr_predicate): Likewise.
(will_be_nonconstant_predicate): Likewise.
(inline_read_section): Stream condition size.
(inline_write_summary): Likewise.

testsuite/
* gcc.dg/ipa/pr70646.c: New test.


Added:
trunk/gcc/testsuite/gcc.dg/ipa/pr70646.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-inline-analysis.c
trunk/gcc/ipa-inline.h
trunk/gcc/testsuite/ChangeLog

[Bug c++/47226] [C++0x] GCC doesn't expand template parameter pack that appears in a lambda-expression

2016-05-18 Thread akim.demaille at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47226

--- Comment #8 from Akim Demaille  ---
I'm hit too.

[Bug ipa/70646] [4.9/5/6/7 Regression] Corrupt truncated function

2016-05-18 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646

--- Comment #33 from Martin Jambor  ---
Author: jamborm
Date: Wed May 18 13:06:24 2016
New Revision: 236390

URL: https://gcc.gnu.org/viewcvs?rev=236390&root=gcc&view=rev
Log:
Respect --param ipa-max-agg-items=0

2016-05-18  Martin Jambor  

PR ipa/70646
* ipa-prop.c (determine_locally_known_aggregate_parts): Bail out early
if parameter PARAM_IPA_MAX_AGG_ITEMS is zero.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-prop.c

[Bug target/71145] Alpha: Error: No lda !gpdisp!278 was found

2016-05-18 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71145

Uroš Bizjak  changed:

   What|Removed |Added

  Component|c++ |target
   Target Milestone|--- |4.9.4

[Bug debug/71171] [6/7 Regression] Conditional jump or move depends on uninitialised value(s) in can_be_stored_compactly_p (line-map.c:148)

2016-05-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71171

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |6.2

[Bug tree-optimization/71020] [6/7 Regression] SSA corruption: Unable to coalesce ssa_names 2 and 13 which are marked as MUST COALESCE.

2016-05-18 Thread rsandifo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71020

--- Comment #4 from rsandifo at gcc dot gnu.org  
---
Author: rsandifo
Date: Wed May 18 14:01:31 2016
New Revision: 236393

URL: https://gcc.gnu.org/viewcvs?rev=236393&root=gcc&view=rev
Log:
To: gcc-patc...@gcc.gnu.org
Subject: PR 71020: Handle abnormal PHIs in tree-call-cdce.c
From: Richard Sandiford 
Gcc: private.sent
--text follows this line--
The PR is about a case where tree-call-cdce.c causes two abnormal
PHIs for the same variable to be live at the same time, leading to
a coalescing failure.  It seemed like getting rid of these kinds of
input would be generally useful, so I added a utility to tree-dfa.c.

Tested on x86_64-linux-gnu.

gcc/
PR middle-end/71020
* tree-dfa.h (replace_abnormal_ssa_names): Declare.
* tree-dfa.c (replace_abnormal_ssa_names): New function.
* tree-call-cdce.c: Include tree-dfa.h.
(can_guard_call_p): New function, extracted from...
(can_use_internal_fn): ...here.
(shrink_wrap_one_built_in_call_with_conds): Remove failure path
and return void.
(shrink_wrap_one_built_in_call): Likewise.
(use_internal_fn): Likewise.
(shrink_wrap_conditional_dead_built_in_calls): Update accordingly
and return void.  Call replace_abnormal_ssa_names.
(pass_call_cdce::execute): Check can_guard_call_p during the
initial walk.  Assume shrink_wrap_conditional_dead_built_in_calls
will always change something.

gcc/testsuite/
* gcc.dg/torture/pr71020.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr71020.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-call-cdce.c
trunk/gcc/tree-dfa.c
trunk/gcc/tree-dfa.h

[Bug target/70915] Improve loading 0/-1 in VSX registers on PowerPC

2016-05-18 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70915

--- Comment #1 from Michael Meissner  ---
Author: meissner
Date: Wed May 18 14:04:32 2016
New Revision: 236394

URL: https://gcc.gnu.org/viewcvs?rev=236394&root=gcc&view=rev
Log:
[gcc]
2016-05-18  Michael Meissner  

PR target/70915
* config/rs6000/constraints.md (wE constraint): New constraint
for a vector constant that can be loaded with XXSPLTIB.
(wM constraint): New constraint for a vector constant of a 1's.
(wS constraint): New constraint for a vector constant that can be
loaded with XXSPLTIB and a vector sign extend instruction.
* config/rs6000/predicates.md (xxspltib_constant_split): New
predicates for wE/wS constraints.
(xxspltib_constant_nosplit): Likewise.
(easy_vector_constant): Add support for constants that can be
loaded via XXSPLTIB.
(all_ones_constant): New predicate for vector constant with all
1's set.
(splat_input_operand): Add support for ISA 3.0 word splat
operations.
* config/rs6000/rs6000.c (xxspltib_constant_p): New function to
return if a constant can be loaded with the ISA 3.0 XXSPLTIB
instruction and possibly with a sign extension.
(output_vec_const_move): Add support for XXSPLTIB. If we are
loading up 0/-1 into Altivec registers, prefer using VSPLTISW
instead of XXLXOR/XXLORC.
(rs6000_expand_vector_init): Add support for ISA 3.0 word splat
operations.
(rs6000_legitimize_reload_address): Likewise.
(rs6000_output_move_128bit): Use output_vec_const_move to emit
constants.
* config/rs6000/vsx.md (VSX_M): Add TImode (if -mvsx-timode) and
combine VSX_M and VSX_M2 into one iterator.
(VSX_M2): Likewise.
(VSINT_84): New iterators for loading constants with XXSPLTIB.
(VSINT_842): Likewise.
(UNSPEC_VSX_SIGN_EXTEND): New UNSPEC.
(xxspltib_v16qi): New insns to load up constants with the ISA 3.0
XXSPLTIB instruction.
(xxspltib__nosplit): Likewise.
(xxspltib__split): New insn to load up constants with
XXSPLTIB and a sign extend instruction.
(vsx_mov): Replace single move that handled all vector types
with separate 32-bit and 64-bit moves.  Combine the movti_
moves (when -mvsx-timode is in effect) into the main vector
moves.  Eliminate separate moves for  , where the
preferred register class () is listed first, and the
secondary register class () is listed second with a '?' to
discourage use.  Prefer loading 0/-1 in any VSX register for ISA
3.0, and Altivec registers for ISA 2.06/2.07 (PR target/70915) so
that if the register was involved in a slow operation, the
clear/set operation does not wait for the slow operation to
finish.  Adjust the length attributes for 32-bit mode.  Use
rs6000_output_move_128bit and drop the use of the string
instructions for 32-bit movti when -mvsx-timode is in effect.  Use
spacing so that the alternatives and attributes don't generate
long lines, and put things in columns, so that it is easier to
match up the operands and attributes with the insn alternatives.
(vsx_mov_64bit): Likewise.
(vsx_mov_32bit): Likewise.
(vsx_movti_64bit): Fold movti into normal vector moves.
(vsx_movti_32bit): Likewise.
(vsx_splat_, V4SI/V4SF modes): Add support for ISA 3.0 word
spat instructions.
(vsx_splat_v4si_internal): Likewise.
(vsx_splat_v4sf_internal): Likewise.
(vector fusion peepholes): Use VSX_M instead of VSX_M2.
(vsx_sign_extend_qi_): New ISA 3.0 instructions to sign
extend vector elements.
(vsx_sign_extend_hi_): Likewise.
(vsx_sign_extend_si_v2di): Likewise.
* config/rs6000/rs6000-protos.h (xxspltib_constant_p): Add
declaration.
* doc/md.texi (PowerPC constraints): Document the wE, wM, and wS
constraints.  Add trailing period to wL documentation.

[gcc/testsuite]
2016-05-18  Michael Meissner  

* gcc.target/powerpc/p9-splat-1.c: New tests for ISA 3.0 word
splat operations and the XXSPLTIB instruction.
* gcc.target/powerpc/p9-splat-2.c: Likewise.
* gcc.target/powerpc/p9-splat-3.c: Likewise.
* gcc.target/powerpc/pr47755.c: Allow vspltisw in addition to
xxlxor to clear a register.


Added:
trunk/gcc/testsuite/gcc.target/powerpc/p9-splat-1.c
trunk/gcc/testsuite/gcc.target/powerpc/p9-splat-2.c
trunk/gcc/testsuite/gcc.target/powerpc/p9-splat-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/constraints.md
trunk/gcc/config/rs6000/predicates.md
trunk/gcc/config/rs6000/rs6000-protos.h
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/rs6000/vsx.md
trunk/gcc/doc/md.texi
trunk/gcc/testsui

[Bug tree-optimization/71170] [7 Regression] ICE in rewrite_expr_tree, at tree-ssa-reassoc.c:3898

2016-05-18 Thread chengniansun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170

Chengnian Sun  changed:

   What|Removed |Added

 CC||chengniansun at gmail dot com

--- Comment #5 from Chengnian Sun  ---
Another test case possibly triggering the same issue.


$: gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20160518 (experimental) [trunk revision 236370] (GCC)
$: gcc-trunk -O1 small.c
small.c: In function ‘fn1’:
small.c:4:6: internal compiler error: in rewrite_expr_tree, at
tree-ssa-reassoc.c:3898
 void fn1() {
  ^~~
0xd6709f rewrite_expr_tree
../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:3897
0xd66980 rewrite_expr_tree
../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:3862
0xd709da reassociate_bb
../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:5249
0xd70207 reassociate_bb
../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:5278
0xd72b03 do_reassoc
../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:5392
0xd72b03 execute_reassoc
../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:5479
0xd72b03 execute
../../gcc-source-trunk/gcc/tree-ssa-reassoc.c:5518
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$:
$: cat small.c
unsigned a;
int b;
short c;
void fn1() {
  int d = 8 * a;
  char e = d || e ^ a;
  b = ~e + (d + a - ~a + c);
}

int main() {}
$:

[Bug c++/70466] [ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real, at cp/call.c:6371 with -std=c++11

2016-05-18 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70466

--- Comment #4 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Wed May 18 14:18:06 2016
New Revision: 236395

URL: https://gcc.gnu.org/viewcvs?rev=236395&root=gcc&view=rev
Log:
/cp
2016-05-18  Paolo Carlini  

PR c++/70466
* call.c (convert_like_real): Check that we are actually converting
from an init list.

/testsuite
2016-05-18  Paolo Carlini  

PR c++/70466
* g++.dg/template/pr70466-1.C: New.
* g++.dg/template/pr70466-2.C: Likewise.

Added:
trunk/gcc/testsuite/g++.dg/template/pr70466-1.C
trunk/gcc/testsuite/g++.dg/template/pr70466-2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/testsuite/ChangeLog

[Bug target/71153] aarch64 LSE __atomic_fetch_and() generates inversion for constants

2016-05-18 Thread dhowells at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71153

--- Comment #8 from dhowells at redhat dot com  ---
(In reply to Andrew Pinski from comment #7)
> Created attachment 38509 [details]
> Full fix which needs full testing

This is looking good:

0058 :
  58:   12001403and w3, w0, #0x3f
  5c:   9346fc02asr x2, x0, #6
  60:   d2800020mov x0, #0x1// #1
  64:   8b020c21add x1, x1, x2, lsl #3
  68:   9ac32000lsl x0, x0, x3
  6c:   f8601020ldclrl  x0, x0, [x1]
  70:   d65f03c0ret

0074 :
  74:   d2a00801mov x1, #0x40   // #4194304
  78:   f8611001ldclrl  x1, x1, [x0]
  7c:   d65f03c0ret

[Bug c++/70466] [ICE on invalid code in tree check: expected constructor, have parm_decl in convert_like_real, at cp/call.c:6371 with -std=c++11

2016-05-18 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70466

--- Comment #5 from Paolo Carlini  ---
Fixed in trunk so far.

[Bug middle-end/71172] New: [7 Regression] FAIL: gcc.dg/tree-ssa/slsr-30.c (internal compiler error)

2016-05-18 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71172

Bug ID: 71172
   Summary: [7 Regression] FAIL: gcc.dg/tree-ssa/slsr-30.c
(internal compiler error)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: kugan.vivekanandarajah at linaro dot org
  Target Milestone: ---

On x86, r236356 caused:

Executing on host:
/export/gnu/import/git/gcc-regression/master/236356/bld/gcc/xgcc
-B/export/gnu/import/git/gcc-regression/master/236356/bld/gcc/
/export/gnu/import/git/gcc-regression/gcc/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c
   -fno-diagnostics-show-caret -fdiagnostics-color=never   -O3 -fdump-tree-dom2
-fwrapv -S -o slsr-30.s(timeout = 300)
spawn -ignore SIGHUP
/export/gnu/import/git/gcc-regression/master/236356/bld/gcc/xgcc
-B/export/gnu/import/git/gcc-regression/master/236356/bld/gcc/
/export/gnu/import/git/gcc-regression/gcc/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -O3 -fdump-tree-dom2
-fwrapv -S -o slsr-30.s
/export/gnu/import/git/gcc-regression/gcc/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c:
In function 'f':
/export/gnu/import/git/gcc-regression/gcc/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c:8:1:
internal compiler error: in rewrite_expr_tree, at tree-ssa-reassoc.c:3898
0x104d229 rewrite_expr_tree
../../../../gcc/gcc/tree-ssa-reassoc.c:3897
0x104d027 rewrite_expr_tree
../../../../gcc/gcc/tree-ssa-reassoc.c:3862
0x1050a58 reassociate_bb
../../../../gcc/gcc/tree-ssa-reassoc.c:5249
0x1050bee reassociate_bb
../../../../gcc/gcc/tree-ssa-reassoc.c:5278
0x105112c do_reassoc
../../../../gcc/gcc/tree-ssa-reassoc.c:5392
0x1051441 execute_reassoc
../../../../gcc/gcc/tree-ssa-reassoc.c:5479
0x1051553 execute
../../../../gcc/gcc/tree-ssa-reassoc.c:5518
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1
output is:
/export/gnu/import/git/gcc-regression/gcc/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c:
In function 'f':
/export/gnu/import/git/gcc-regression/gcc/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c:8:1:
internal compiler error: in rewrite_expr_tree, at tree-ssa-reassoc.c:3898
0x104d229 rewrite_expr_tree
../../../../gcc/gcc/tree-ssa-reassoc.c:3897
0x104d027 rewrite_expr_tree
../../../../gcc/gcc/tree-ssa-reassoc.c:3862
0x1050a58 reassociate_bb
../../../../gcc/gcc/tree-ssa-reassoc.c:5249
0x1050bee reassociate_bb
../../../../gcc/gcc/tree-ssa-reassoc.c:5278
0x105112c do_reassoc
../../../../gcc/gcc/tree-ssa-reassoc.c:5392
0x1051441 execute_reassoc
../../../../gcc/gcc/tree-ssa-reassoc.c:5479
0x1051553 execute
../../../../gcc/gcc/tree-ssa-reassoc.c:5518
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

FAIL: gcc.dg/tree-ssa/slsr-30.c (internal compiler error)
FAIL: gcc.dg/tree-ssa/slsr-30.c (test for excess errors)

[Bug middle-end/71172] [7 Regression] FAIL: gcc.dg/tree-ssa/slsr-30.c (internal compiler error)

2016-05-18 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71172

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||ktkachov at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #2 from ktkachov at gcc dot gnu.org ---
dup.

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

[Bug tree-optimization/71170] [7 Regression] ICE in rewrite_expr_tree, at tree-ssa-reassoc.c:3898

2016-05-18 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71170

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #6 from ktkachov at gcc dot gnu.org ---
*** Bug 71172 has been marked as a duplicate of this bug. ***

[Bug rtl-optimization/71150] [7 Regression] ICE on valid code at -O1 and above in 64-bit mode on x86_64-linux-gnu in lra_eliminate_reg_if_possible, at lra-eliminations.c:1402

2016-05-18 Thread jiwang at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71150

--- Comment #3 from Jiong Wang  ---
Author: jiwang
Date: Wed May 18 14:37:28 2016
New Revision: 236396

URL: https://gcc.gnu.org/viewcvs?rev=236396&root=gcc&view=rev
Log:
[Patch, lra] Guard in_class_p with REG_P check

gcc/

PR rtl-optimization/71150
* lra-constraint (process_addr_reg): Guard "in_class_p" with REG_P
check.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/lra-constraints.c

[Bug rtl-optimization/71150] [7 Regression] ICE on valid code at -O1 and above in 64-bit mode on x86_64-linux-gnu in lra_eliminate_reg_if_possible, at lra-eliminations.c:1402

2016-05-18 Thread jiwang at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71150

Jiong Wang  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Jiong Wang  ---
fixed.

[Bug debug/71171] [6/7 Regression] Conditional jump or move depends on uninitialised value(s) in can_be_stored_compactly_p (line-map.c:148)

2016-05-18 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71171

David Malcolm  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-05-18
   Assignee|unassigned at gcc dot gnu.org  |dmalcolm at gcc dot 
gnu.org
 Ever confirmed|0   |1

[Bug target/71161] [7 Regression] Lots of ASAN and libgo runtime FAILs after r236090

2016-05-18 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71161

--- Comment #14 from uros at gcc dot gnu.org ---
Author: uros
Date: Wed May 18 14:40:54 2016
New Revision: 236397

URL: https://gcc.gnu.org/viewcvs?rev=236397&root=gcc&view=rev
Log:
PR target/71161
* elf.c (phdr_callback) [__i386__]: Add
__attribute__((__force_align_arg_pointer__)).


Modified:
trunk/libbacktrace/ChangeLog
trunk/libbacktrace/elf.c

[Bug middle-end/71172] [7 Regression] FAIL: gcc.dg/tree-ssa/slsr-30.c (internal compiler error)

2016-05-18 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71172

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-05-18
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu  ---
This happens on x86-64.

[Bug target/71161] [7 Regression] Lots of ASAN and libgo runtime FAILs after r236090

2016-05-18 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71161

--- Comment #15 from uros at gcc dot gnu.org ---
Author: uros
Date: Wed May 18 14:48:40 2016
New Revision: 236398

URL: https://gcc.gnu.org/viewcvs?rev=236398&root=gcc&view=rev
Log:
PR target/71161
* elf.c (phdr_callback) [__i386__]: Add
__attribute__((__force_align_arg_pointer__)).


Modified:
branches/gcc-6-branch/libbacktrace/ChangeLog
branches/gcc-6-branch/libbacktrace/elf.c

[Bug c++/71173] New: [6 regression] Qualified name lookup

2016-05-18 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71173

Bug ID: 71173
   Summary: [6 regression] Qualified name lookup
   Product: gcc
   Version: 6.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Casey at Carter dot net
  Target Milestone: ---

This program should compile without error:

namespace foo {
  namespace bar {
class foo {};
  }
  class baz {};
}
using namespace foo::bar;
::foo::baz mybaz;

but GCC 6 reports (http://melpon.org/wandbox/permlink/2n9QQUT0UIXog2Cj):

prog.cc:9:8: error: 'baz' in 'class foo::bar::foo' does not name a type
 ::foo::baz mybaz;
^~~

The name `::foo` should refer to the namespace `::foo`, not to the class
`::foo::bar::foo` per [namespace.qual]/2:

For a namespace X and name m, the namespace-qualified lookup set S(X,m) is
defined as follows: Let S0(X,m) be the set of all declarations of m in X and
the inline namespace set of X (7.3.1). If S0(X,m) is not empty, S(X,m) is
S0(X,m); otherwise, S(X,m) is the union of S(Ni,m) for all namespaces Ni
nominated by using-directives in X and its inline namespace set.

S0(::,foo) is not empty, so namespaces nominated by using-directives should
never be examined.

[Bug target/70915] Improve loading 0/-1 in VSX registers on PowerPC

2016-05-18 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70915

Michael Meissner  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |meissner at gcc dot 
gnu.org

--- Comment #2 from Michael Meissner  ---
Fixed in subversion id 236394.

[Bug target/70670] Duplicate code in rs6000_secondary_reload_direct_move in rs6000.c

2016-05-18 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70670

Michael Meissner  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Michael Meissner  ---
Fixed in subversion id 236394.

[Bug c++/71174] New: segmentation fault

2016-05-18 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71174

Bug ID: 71174
   Summary: segmentation fault
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: t at sharklasers dot com
  Target Milestone: ---

[Bug c++/71166] [6/7 Regression] ICE with nested constexpr/initializer

2016-05-18 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71166

--- Comment #3 from Nathan Sidwell  ---
Created attachment 38514
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38514&action=edit
slightly more reduced test case

We're invoking constexpr evaluation machinery after parsing is complete --
fini_constexpt has already been called.  This occurs during the emission of
BarContainer's constructor, after we've destructively gimplified MakeFoo.  We
end up in

0xa05bf2 maybe_constant_init(tree_node*, tree_node*)
../../../src/gcc/cp/constexpr.c:4457
0x929ce6 build_vec_init(tree_node*, tree_node*, tree_node*, bool, int, int)
../../../src/gcc/cp/init.c:4178
0x9db06b cp_gimplify_expr(tree_node**, gimple**, gimple**)
../../../src/gcc/cp/cp-gimplify.c:592

and from there we have const_expr_eval (Bar) -> const_expr_eval (MakeFoo) ->
ICE
The object we're gimplifying is a vec_init_expr

[Bug c++/71174] segmentation fault

2016-05-18 Thread t at sharklasers dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71174

--- Comment #1 from JD  ---
Created attachment 38515
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38515&action=edit
Short example

  1   2   >