[Bug target/67973] All the tests for -gstabs* fail on x86_64-apple-darwin14 with Xcode 7

2016-01-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67973

--- Comment #18 from Dominique d'Humieres  ---
> Created attachment 37227 [details]
> back-port of Rainer's fix.

Results with the patch posted at
https://gcc.gnu.org/ml/gcc-testresults/2016-01/msg01115.html

Rainer,

Do you mind if I commit the patch to the gcc5 branch?

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #17 from Dominique d'Humieres  ---
Results with the third patch at

https://gcc.gnu.org/ml/gcc-testresults/2016-01/msg01115.html

It looks good.

[Bug bootstrap/57438] bootstrap fails on x86_64 darwin in stage2 linking cc1

2016-01-13 Thread iains at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57438

--- Comment #27 from Iain Sandoe  ---
(In reply to Uroš Bizjak from comment #26)
> +  /* If we don't find any, we've got an empty function body; i.e.
> +  completely empty - without a return or branch.  Reaching an
> +  empty function body means UB.  Let's trap it.  */
> +  if (insn == NULL)
> + fputs ("\thlt\n", file);
> 
> Probably sou want to use ud2 instruction here.

yeah, hlt is a little drastic ;-)

[Bug sanitizer/69147] [5 Regression] Several hundred asan failures with 5.3.1 on x86_64-apple-darwin15

2016-01-13 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69147

--- Comment #18 from Maxim Ostapenko  ---
Author: chefmax
Date: Wed Jan 13 09:27:38 2016
New Revision: 232316

URL: https://gcc.gnu.org/viewcvs?rev=232316=gcc=rev
Log:
Cherry-pick r224315 and r241487 from upstream.

PR sanitizer/69147
* asan/asan_mac.cc: Cherry pick upstream r241487.
* sanitizer_common/sanitizer_mac.cc: Cherry pick upstream r224315.
* sanitizer_common/sanitizer_mac.h: Likewise.

Modified:
branches/gcc-5-branch/libsanitizer/ChangeLog
branches/gcc-5-branch/libsanitizer/asan/asan_mac.cc
branches/gcc-5-branch/libsanitizer/sanitizer_common/sanitizer_mac.cc
branches/gcc-5-branch/libsanitizer/sanitizer_common/sanitizer_mac.h

[Bug ipa/69241] [6 Regression] ICE: in assign_temp, at function.c:961

2016-01-13 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69241

--- Comment #3 from Markus Trippelsdorf  ---
The assertion started to fail with the merge of the C++ delayed folding branch.
r230365

[Bug tree-optimization/69186] ICE at -O3 on x86_64-linux-gnu in vect_update_misalignment_for_peel, at tree-vect-data-refs.c:889

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69186

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Wed Jan 13 08:26:45 2016
New Revision: 232314

URL: https://gcc.gnu.org/viewcvs?rev=232314=gcc=rev
Log:
2016-01-13  Richard Biener  

PR tree-optimization/69186
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
Properly guard vect_update_misalignment_for_peel call.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr69186.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-data-refs.c

[Bug tree-optimization/69242] [6 Regression] ICE in visit_reference_op_load, at tree-ssa-sccvn.c:3224

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69242

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Wed Jan 13 08:27:42 2016
New Revision: 232315

URL: https://gcc.gnu.org/viewcvs?rev=232315=gcc=rev
Log:
2016-01-13  Richard Biener  

PR tree-optimization/69242
* tree-ssa-sccvn.c (visit_reference_op_load): Replace bogus
assert with a check.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr69242.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-sccvn.c

[Bug tree-optimization/69242] [6 Regression] ICE in visit_reference_op_load, at tree-ssa-sccvn.c:3224

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69242

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/69186] ICE at -O3 on x86_64-linux-gnu in vect_update_misalignment_for_peel, at tree-vect-data-refs.c:889

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69186

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug c++/69257] g++ ICE in "create_tmp_var" on invalid inline-asm

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69257

Andrew Pinski  changed:

   What|Removed |Added

Summary|g++ ICE (segfault) on   |g++ ICE in "create_tmp_var"
   |x86_64-linux-gnu in |on invalid inline-asm
   |"create_tmp_var"|

--- Comment #2 from Andrew Pinski  ---
This is what the C front-end produces:
t.c: In function ‘fn1’:
t.c:3:20: error: dereferencing pointer to incomplete type ‘struct S’
   __asm ( "": :"" (*x));
^~

[Bug libstdc++/66006] [6 regression] abi_check FAILs

2016-01-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66006

Rainer Orth  changed:

   What|Removed |Added

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

--- Comment #3 from Rainer Orth  ---
Fixed for 6.1.0.

[Bug c++/68357] [6 Regression] FAIL: g++.dg/other/darwin-cfstring1.C -std=* (internal compiler error) on x86_64-apple-darwin1(0|4|5)

2016-01-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68357

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---
Summary|[6 Regression] FAIL:|[6 Regression] FAIL:
   |g++.dg/other/darwin-cfstrin |g++.dg/other/darwin-cfstrin
   |g1.C  -std=* (internal  |g1.C  -std=* (internal
   |compiler error) on  |compiler error) on
   |x86_64-apple-darwin1(0|4)   |x86_64-apple-darwin1(0|4|5)

--- Comment #3 from Dominique d'Humieres  ---
The ICE reappeared between revisions r232232 (errors) and r232294 (ICE).

[Bug middle-end/69156] [6 Regression] gcc.dg/pr59630.c: ICE: verify_gimple failed: non-trivial conversion at assignment with -fno-tree-ccp

2016-01-13 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69156

--- Comment #5 from rguenther at suse dot de  ---
On Fri, 8 Jan 2016, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69156
> 
> --- Comment #4 from Jakub Jelinek  ---
> (In reply to Richard Biener from comment #3)
> > (In reply to Jakub Jelinek from comment #2)
> > > Created attachment 37266 [details]
> > > gcc6-pr69156.patch
> > > 
> > > Untested fix.  Not sure if it is the best spot though.  And the testcase 
> > > is
> > > really nasty.
> > 
> > Hmm, but this means things were mismatched in the first place (earlier) and
> > thus this should be checked somewhere else?
> 
> This happens in gimple-match-head.c:
> 714   tree decl = TREE_OPERAND (fn, 0);
> 715   if (DECL_BUILT_IN_CLASS (decl) != BUILT_IN_NORMAL
> 716   || !gimple_builtin_call_types_compatible_p (stmt,
> decl))
> 717 return false;
> and the problem is that gimple_builtin_call_types_compatible_p is extremely
> lose (basically, for return type or arguments considers all integral types
> equal, or all pointer types equal, or all RECORD_TYPEs equal etc.).
> Bet for this purpose (but don't about all the others) it might be better to
> check useless_type_conversion_p equality instead.
> I guess the question is when is a mere validate_type instead of
> types_compatible_p useful.

Ick.  That's the code "copied" from builtins.c.  I suppose we should
simply exchange the validate_type calls with useless_type_conversion_p ()
(in the correct order).  That should be coarse enough these days.

[Bug target/67973] All the tests for -gstabs* fail on x86_64-apple-darwin14 with Xcode 7

2016-01-13 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67973

--- Comment #19 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #18 from Dominique d'Humieres  ---
>> Created attachment 37227 [details]
>> back-port of Rainer's fix.
>
> Results with the patch posted at
> https://gcc.gnu.org/ml/gcc-testresults/2016-01/msg01115.html
>
> Rainer,
>
> Do you mind if I commit the patch to the gcc5 branch?

I don't mind, of course, but neither do I test the gcc-5 branch on Mac
OS X these days nor is it my call.

Rainer

[Bug ipa/69239] [5/6 Regression] g++.dg/ipa/devirt-c-3.C FAILs with -O2 -fPIC --param=early-inlining-insns=196

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69239

Jakub Jelinek  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
  Component|middle-end  |ipa

--- Comment #2 from Jakub Jelinek  ---
-fno-devirtualize fixes it.
Seems the obj->foo call in middleman is devirtualized to _ZThn16_N1B3fooEi,
although middleend can (and is) called from A constructor and therefore it
really should call _ZN1A3fooEi in that case.

[Bug bootstrap/57438] bootstrap fails on x86_64 darwin in stage2 linking cc1

2016-01-13 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57438

--- Comment #26 from Uroš Bizjak  ---
+  /* If we don't find any, we've got an empty function body; i.e.
+completely empty - without a return or branch.  Reaching an
+empty function body means UB.  Let's trap it.  */
+  if (insn == NULL)
+   fputs ("\thlt\n", file);

Probably sou want to use ud2 instruction here.

[Bug tree-optimization/69255] ICE (segfault) on x86_64-linux-gnu in "emit_move_insn"

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69255

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #1 from Jakub Jelinek  ---
#pragma GCC target "avx512vl"
#pragma GCC target "no-avx512vl"
__attribute__ ((__vector_size__ (4 * sizeof (long long long a;
__attribute__ ((__vector_size__ (2 * sizeof (long int b;

void
foo (const long long *p)
{
  a = __builtin_ia32_gather3siv4di (a, p, b, 1, 1);
}

There are several issues.
One is that the error-recovery in ix86_expand_builtin looks wrong, if the call
is to unsupported ISA, then it always returns const0_rtx, which is wrong for
BLKmode.

So I think we want either:
--- i386.c.jj 2016-01-12 14:20:13.0 +0100
+++ i386.c 2016-01-13 09:58:57.987193230 +0100
@@ -40249,7 +40249,7 @@ ix86_expand_builtin (tree exp, rtx targe
   error ("%qE needs isa option %s", fndecl, opts);
   free (opts);
 }
-  return const0_rtx;
+  return target ? target : const0_rtx;
 }

   switch (fcode)

or say what rs6000 uses in that case:
  return expand_call (exp, target, ignore);
(though returning target is probably good enough).

The second issue is with expansion of VECTOR_TYPE_P non-automatic VAR_DECLs.
TYPE_MODE for those returns vector_type_mode, so the mode depends on whether
the function's ISA supports those vector modes or not.  But, DECL_RTL of those
VAR_DECLs has been possibly created under different ISA, so there is the
possibility that their DECL_RTL's mode does not match the TYPE_MODE.
Wonder if expansion for VECTOR_TYPE_P (TREE_TYPE (exp)) TREE_STATIC VAR_Ps
should not look at TYPE_MODE of their type and if there is a mismatch, instead
of using DECL_RTL as is, create a different MEM with the mode changed to match.

The question is of course if single element structs with vector type element
don't need similar treatment.

[Bug middle-end/68621] [6 Regression] FAIL: gcc.dg/tree-ssa/ifc-8.c scan-tree-dump-times ifcvt "Applying if-conversion" 1

2016-01-13 Thread vekumar at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68621

vekumar at gcc dot gnu.org changed:

   What|Removed |Added

 CC||vekumar at gcc dot gnu.org

--- Comment #1 from vekumar at gcc dot gnu.org ---
We do this optimization under -fno-common. In case of -fpic this option does
not have any effect and the array declaration is assumed as can be overridden.

[Bug tree-optimization/52346] Two abs in a row isn't being optimized to just one on the tree level

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52346

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #2 from Andrew Pinski  ---
Fixed for 6.0:

Visiting statement:
_3 = ABS_EXPR ;
which is likely CONSTANT
Applying pattern match.pd:683, gimple-match.c:8656
Match-and-simplified ABS_EXPR  to a_2
Lattice value changed to CONSTANT a_2.  Adding SSA edges to worklist.
interesting_ssa_edges: adding SSA use in return _3;
marking stmt to be not simulated again

[Bug tree-optimization/69042] [6 regression] Missed optimization in ivopts

2016-01-13 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69042

--- Comment #3 from amker at gcc dot gnu.org ---
(In reply to amker from comment #2)
> For iv use:
> use 0
>   address
>   in statement _9 = indexes[i_23];
> 
>   at position indexes[i_23]
>   type const int *
>   base (const int *) ( + 4)
>   step 4
>   base object (void *) 
>   related candidates 
> 
> Before the change, two candidates are added:
> candidate 8
>   var_before ivtmp.12
>   var_after ivtmp.12
>   incremented before exit test
>   type unsigned int
>   base (unsigned int) ( + 4)
>   step 4
>   base object (void *) 
> candidate 10
>   var_before ivtmp.14
>   var_after ivtmp.14
>   incremented before exit test
>   type unsigned int
>   base (unsigned int) 
>   step 4
>   base object (void *) 
> After the change only candidate 8 is added.  I did this to minimize the
> number of candidates.  Maybe that's too aggressive.  Probably candidate like
> this (with offset stripped) should be added, I will check if it causes new
> regressions.
> 
> Another problem is candidate 8 could be chosen to decrease register
> pressure, but isn't.  I will check why the register pressure cost doesn't
> work in this case.  Though candidate 8 is still a little bit worse than
> candidate 10, because of one more setup instruction in loop pre-header block.

For this register pressure question.
GCC assumes that symbol "indexes" in memory reference "MEM[symbol: indexes,
index: _21, step: 4, offset: 0B]" doesn't introduce any register pressure
because we can use addressing mode like "indexes(,%eax,4)".  This is not true
for pic/pie code.  In such case, we need to move "indexes@GOT(%eax)" to a
register before using it in memory reference.  That's why the additional
register use not counted in register pressure computation in IVOPT.

[Bug target/69247] [6 Regression] ICE in gen_reg_rtx, at emit-rtl.c:1024 on s390x-linux-gnu

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69247

--- Comment #4 from Jakub Jelinek  ---
Thanks.  Please include the testcase from the other patch.

[Bug c++/69257] g++ ICE (segfault) on x86_64-linux-gnu in "create_tmp_var"

2016-01-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69257

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-13
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.

[Bug libstdc++/66006] [6 regression] abi_check FAILs

2016-01-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66006

--- Comment #2 from Rainer Orth  ---
Author: ro
Date: Wed Jan 13 09:48:53 2016
New Revision: 232317

URL: https://gcc.gnu.org/viewcvs?rev=232317=gcc=rev
Log:
Introduce separate baselines for Solaris 10 and 11+ (PR libstdc++/66006)

PR libstdc++/66006
* configure.host (abi_baseline_pair): Use separate baseline for
Solaris 11+ and Solaris 10 with gld.
* config/abi/post/solaris2.11/amd64/baseline_symbols.txt: New file.
* config/abi/post/solaris2.11/baseline_symbols.txt: New file.
* config/abi/post/solaris2.11/sparcv9/baseline_symbols.txt: New file.

Added:
trunk/libstdc++-v3/config/abi/post/solaris2.11/
trunk/libstdc++-v3/config/abi/post/solaris2.11/amd64/
trunk/libstdc++-v3/config/abi/post/solaris2.11/amd64/baseline_symbols.txt
trunk/libstdc++-v3/config/abi/post/solaris2.11/baseline_symbols.txt
trunk/libstdc++-v3/config/abi/post/solaris2.11/sparcv9/
trunk/libstdc++-v3/config/abi/post/solaris2.11/sparcv9/baseline_symbols.txt
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/configure.host

[Bug tree-optimization/69042] [6 regression] Missed optimization in ivopts

2016-01-13 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69042

--- Comment #4 from amker at gcc dot gnu.org ---
Still need to check if aarch64 is affected by this register pressure issue.  It
shouldn't because we don't support symbol in addressing mode and need to
compute it outside mem ref anyway.

[Bug tree-optimization/68976] [6 Regression] ICE w/ -O2 (and above) -fgraphite-identity (or -floop-nest-optimize)

2016-01-13 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68976

--- Comment #5 from Joost VandeVondele  
---
I'm somewhat surprised graphite regressions get a P4. 

Discussions on the list suggested that graphite would be enabled by default in
the near future. Lowering graphite regression priority to 'not serious' signals
the opposite.

It is a bit a chicken-and-egg problem, graphite won't get good testing if it is
not reliable, and it won't get reliable if it doesn't get good testing.

[Bug middle-end/69258] New: Flexible arrays break TBAA

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69258

Bug ID: 69258
   Summary: Flexible arrays break TBAA
   Product: gcc
   Version: 5.3.0
Status: UNCONFIRMED
  Keywords: alias, wrong-code
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

struct Xflex { int n; int a[1]; };
struct Xspecific { int n; int a[7]; } x;

int foo (struct Xflex *f)
{
  f->a[6] = 2;
  x.a[6] = 1;
  return f->a[6];
}

returns 2 with -fstrict-aliasing :(

[Bug target/69236] Wrong function call when use weak statement

2016-01-13 Thread thln47 at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69236

--- Comment #2 from Thln47  ---
Hello,

I think too that is bug in the linker.

I've reported it here:
https://sourceware.org/bugzilla/show_bug.cgi?id=19460

[Bug target/69247] [6 Regression] ICE in gen_reg_rtx, at emit-rtl.c:1024 on s390x-linux-gnu

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69247

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #6 from Jakub Jelinek  ---
Fixed.  Please post the patch to gcc-patches though (unless you've done so
already).

[Bug lto/69254] internal compiler error: in streamer_get_builtin_tree, at tree-streamer-in.c:1144

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69254

--- Comment #1 from Richard Biener  ---
Can you please try narrowing down to a testcase?

[Bug target/69247] [6 Regression] ICE in gen_reg_rtx, at emit-rtl.c:1024 on s390x-linux-gnu

2016-01-13 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69247

--- Comment #5 from Andreas Krebbel  ---
Author: krebbel
Date: Wed Jan 13 11:59:29 2016
New Revision: 232318

URL: https://gcc.gnu.org/viewcvs?rev=232318=gcc=rev
Log:
S/390: PR69247: Fix bswap hi splitter.

gcc/ChangeLog:

2016-01-13  Andreas Krebbel  

PR target/69247
* config/s390/s390.md (bswaphi splitter): Use simplify_gen_subreg.

gcc/testsuite/ChangeLog:

2016-01-13  Jakub Jelinek  

PR target/69247
* gcc.dg/pr69247.c: New test.



Added:
trunk/gcc/testsuite/gcc.dg/pr69247.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/s390/s390.md
trunk/gcc/testsuite/ChangeLog

[Bug middle-end/69258] Flexible arrays break TBAA

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69258

--- Comment #1 from Richard Biener  ---
extern void abort (void);

struct Xflex { int n; int a[1]; };
struct Xspecific { int n; int a[7]; } x;

int __attribute__((noinline,noclone))
foo (struct Xflex *f)
{
  x.a[6] = 1;
  f->a[6] = 2;
  return x.a[6];
}

int __attribute__((noinline,noclone))
bar (struct Xflex *f)
{
  f->a[6] = 2;
  x.a[6] = 1;
  return f->a[6];
}

int main()
{
  if (foo ((struct Xflex *)) != 2)
abort ();
  if (bar ((struct Xflex *)) != 1)
abort ();
  return 0;
}

[Bug tree-optimization/69013] [5/6 Regression] gfortran-5.3.0 ICE in prune_uninit_phi_opnds_in_unrealizable_paths, at tree-ssa-uninit.c:1121

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69013

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||5.4.0
 Resolution|--- |FIXED

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

[Bug target/69252] [4.9/5/6 Regression] gcc.dg/vect/vect-iv-9.c FAILs with -Os -fmodulo-sched -fmodulo-sched-allow-regmoves -fsched-pressure

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69252

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug middle-end/69258] Flexible arrays break TBAA

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69258

Richard Biener  changed:

   What|Removed |Added

 CC||jsm28 at gcc dot gnu.org

--- Comment #4 from Richard Biener  ---
Maybe undefined though (flex arrays are supposed to be used for allocated
storage and thus doesn't need to alias with static storage?)

[Bug rtl-optimization/69238] [4.9/5/6 Regression] gcc.dg/vect/vect-multitypes-1.c FAILs with -O2 -fno-dce -fno-forward-propagate -fno-rerun-cse-after-loop -funroll-loops

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69238

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-13
 CC||jakub at gcc dot gnu.org,
   ||meissner at gcc dot gnu.org,
   ||vmakarov at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Very likely a dup of PR69195.  Again, similarly to the other PR, there are
numerous loads followed by numerous stores, pseudo 242 is REG_DEAD on the last
load, then there is some unrelated load into pseudo 298 and then stores.
Now, IRA decides because of the live info that both pseudo 242 and 298 are put
into r4, but then reload (the testcase works with -mlra, why can't finally the
powerpc* port switch away from reload :( ?!) chooses to materialize the loads
next to the corresponding stores, and uses there the r4 [242] eventhough it has
been clobbered already by the load to r4 [298].

[Bug c/68062] [4.9/5/6 Regression] ICE when comparing vectors

2016-01-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68062

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #14 from Marek Polacek  ---
Looking into this again.

[Bug preprocessor/69177] [6 Regression] Bit-packing optimization makes it too easy to have location_t >= LINE_MAP_MAX_LOCATION_WITH_COLS

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69177

Richard Biener  changed:

   What|Removed |Added

   Priority|P4  |P1

[Bug middle-end/69258] Flexible arrays break TBAA

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69258

--- Comment #3 from Richard Biener  ---
Using

struct Xflex { int n; int a[]; };

doesn't fix it (as expected).

[Bug tree-optimization/69013] [5/6 Regression] gfortran-5.3.0 ICE in prune_uninit_phi_opnds_in_unrealizable_paths, at tree-ssa-uninit.c:1121

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69013

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Wed Jan 13 12:18:02 2016
New Revision: 232321

URL: https://gcc.gnu.org/viewcvs?rev=232321=gcc=rev
Log:
2016-01-13  Richard Biener  

PR tree-optimization/69013
* tree-ssa-uninit.c (prune_uninit_phi_opnds_in_unrealizable_paths):
Exchange assert for a test.

Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/tree-ssa-uninit.c

[Bug target/68759] [6 Regression] Linux kernel build failure on ppc64le

2016-01-13 Thread uweigand at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68759

--- Comment #6 from Ulrich Weigand  ---
FYI, two patches to fix this issue have just been committed to powerpc-next:

https://git.kernel.org/powerpc/c/2e50c4bef77511b42cc226865d

https://git.kernel.org/powerpc/c/a61674bdfc7c2bf909c4010699

[Bug tree-optimization/69249] Array-boundary offending code is silently discarded without warnings

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69249

Richard Biener  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-13
  Component|c   |tree-optimization
 Ever confirmed|0   |1
   Severity|major   |enhancement

--- Comment #2 from Richard Biener  ---
Confirmed as diagnostic enhancement request.

[Bug fortran/68649] [6 Regression] note: code may be misoptimized unless -fno-strict-aliasing is used

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68649

--- Comment #13 from Richard Biener  ---
Note that the cast doesn't help in itself (but for the warning) as Jakub
notices.
The deeper issue is type-based aliasing here.  IMHO libgfortran would need to
use

struct A { float *base_addr; size_t offset; long dtype; struct D dim[1]; }
*desc;

aka a pointer to a descriptor with flexible array member.  Which I hope ends
up aliasing with one with a different size.  Well, we treat 'dim' as flexible
array member in any case but I'm not aware of any code in alias.c that makes
this work.

struct Xflex { int n; int a[1]; };
struct Xspecific { int n; int a[7]; } x;

int foo (struct Xflex *f)
{
  f->a[6] = 2;
  x.a[6] = 1;
  return f->a[6];
}

returns 2 with -fstrict-aliasing :(

Thus even the proposed fix won't end up working.

[Bug middle-end/69258] Flexible arrays break TBAA

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69258

Richard Biener  changed:

   What|Removed |Added

  Known to work||3.4.6
  Known to fail||4.0.4

--- Comment #2 from Richard Biener  ---
Seems for some reason 3.4.6 worked.

[Bug libstdc++/69259] New: std::experimental::filesystem::copy does not create symlinks for directories

2016-01-13 Thread p...@x-fabric.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69259

Bug ID: 69259
   Summary: std::experimental::filesystem::copy does not create
symlinks for directories
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: p...@x-fabric.com
  Target Milestone: ---

The following test case fails when I try to soft-link the root directory to the
current directory under the name "root".

TEST_CASE("basic filesystem", "[basic]") {
SECTION("symlink") {
copy("/", "root", copy_options::create_symlinks);
REQUIRE(exists("root"));
}
}

The reason is that fs::copy(...) does not handle the case where the "from"
parameter points to a directory, but options is set to
copy_options::create_symlink.

IMO, another section needs to be added at the bottom of the function

else if (is_directory(f) && (is_set(options, copy_options::create_symlink)) {
  create_symlink(from, to, ec);
}

Thanks and regards,
  Roman

[Bug tree-optimization/69013] [5/6 Regression] gfortran-5.3.0 ICE in prune_uninit_phi_opnds_in_unrealizable_paths, at tree-ssa-uninit.c:1121

2016-01-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69013

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Wed Jan 13 12:15:01 2016
New Revision: 232320

URL: https://gcc.gnu.org/viewcvs?rev=232320=gcc=rev
Log:
2016-01-13  Richard Biener  

PR tree-optimization/69013
* tree-ssa-uninit.c (prune_uninit_phi_opnds_in_unrealizable_paths):
Exchange assert for a test.

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

[Bug tree-optimization/69155] [6 Regression] ICE (segfault in gimple_stmt_nonnegative_warnv_p)

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69155

--- Comment #12 from Jakub Jelinek  ---
Created attachment 37335
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37335=edit
gcc6-pr69155-wip.patch

Partial patch I've bootstrapped/regtested on x86_64-linux and i686-linux. 
Either our testsuite coverage is insufficient, or it might be safe to only deal
with PHI arguments and nothing else if we walk in rpo order.
In that case, as the renamer is not prepared to handle PHIs with
non-is_gimple_val arguments and renaming them, it might be much easier to just
not use the renamer and simply record the PHIs we still need to update, push
the underlying VAR_DECLs (or extra temporaries for anon SSA_NAMEs) to the PHI
arguments first and get back to them at the end (or immediately once the
SSA_NAME is defined?).

[Bug middle-end/69258] Flexible arrays break TBAA

2016-01-13 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69258

--- Comment #5 from joseph at codesourcery dot com  ---
I don't see a need for these different structures to be able to alias.  
(Flexible array members do need to be able to alias static storage, in the 
case where that static storage was declared with the structure type with 
the flexible array member and the GNU C extension of initializing such 
flexible array members was used.)

[Bug tree-optimization/69042] [6 regression] Missed optimization in ivopts

2016-01-13 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69042

--- Comment #5 from amker at gcc dot gnu.org ---
(In reply to Andrew Pinski from comment #1)
> Confirmed, even on aarch64 too.  Replacing the asm with:
>  
> asm("":::"x0","x1","x2","x3","x4","x5","x6","x7","x8","x9","x10","x11","x12",
> "x13","x14","x15","x16","x17","x18","x19","x20","x21","x22","x23","x24",
> "x25","x26","x27","x28","x30");
> 
> 
> Shows the problem there.

AArch64 case is complicated.
1) TREE/IVOPT doesn't understand asm instruction and its register pressure.

2) cost computation with symbol_ref involved is a mess because of both IVOPT
and AArch64 backend.  
3) Same as x86_64, IVOPT doesn't count register pressure for symbol value in
memory reference.
...
And most important:
4) If IVOPT picks up candidate {*index, 4}, it does decrease register pressure
by one at the point of array reference, but this is neutralized because at exit
condition of the loop, we need one more register to hold the terminating value.
 For now it's a constant 64 and can be rematerialized in cmp instruction.
I think there is no benefit on AArch64 wrto this example.

[Bug tree-optimization/68977] [gomp4] FAIL: c-c++-common/goacc/loop-2.c (internal compiler error)

2016-01-13 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68977

vries at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from vries at gcc dot gnu.org ---
patch committed.

No test-case committed, given that I can't reproduce the ICE anymore.

Marking resolved-fixed.

[Bug rtl-optimization/69102] [4.9/5/6 Regression] ICE: in move_op_ascend, at sel-sched.c:6138 with -fselective-scheduling2

2016-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69102

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

--- Comment #3 from Jeffrey A. Law  ---
Downgrading to P4 on the basis that it's specific to sel-sched that's only used
by default on ia64, a dead architecture.

[Bug c++/69266] New: bootstrap failure undefined reference to `std::basic_ios<char, std::char_traits >::

2016-01-13 Thread tprince at computer dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69266

Bug ID: 69266
   Summary: bootstrap failure undefined reference to
`std::basic_ios::
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tprince at computer dot org
  Target Milestone: ---

libtool: link:  /cygdrive/c/users/tim/tim/tim/src/gnu/gcc1/cyg64/./gcc/xgcc
-sha
red-libgcc -B/cygdrive/c/users/tim/tim/tim/src/gnu/gcc1/cyg64/./gcc -nostdinc++
-L/cygdrive/c/users/tim/tim/tim/src/gnu/gcc1/cyg64/x86_64-unknown-cygwin/libstdc
++-v3/src
-L/cygdrive/c/users/tim/tim/tim/src/gnu/gcc1/cyg64/x86_64-unknown-cygw
in/libstdc++-v3/src/.libs
-L/cygdrive/c/users/tim/tim/tim/src/gnu/gcc1/cyg64/x86
_64-unknown-cygwin/libstdc++-v3/libsupc++/.libs
-B/usr/local/gcc6.0/x86_64-unkno
wn-cygwin/bin/ -B/usr/local/gcc6.0/x86_64-unknown-cygwin/lib/ -isystem
/usr/loca
l/gcc6.0/x86_64-unknown-cygwin/include -isystem
/usr/local/gcc6.0/x86_64-unknown
-cygwin/sys-include-shared -nostdlib
/cygdrive/c/users/tim/tim/tim/src/gnu/g
cc1/cyg64/./gcc/crtbeginS.o  .libs/compatibility.o
.libs/compatibility-debug_lis
t.o .libs/compatibility-debug_list-2.o .libs/compatibility-c++0x.o
.libs/compati
bility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o
.libs/compatibility-chr
ono.o .libs/compatibility-condvar.o  -Wl,--whole-archive
../libsupc++/.libs/libs
upc++convenience.a ../src/c++98/.libs/libc++98convenience.a
../src/c++11/.libs/l
ibc++11convenience.a -Wl,--no-whole-archive 
-L/cygdrive/c/users/tim/tim/tim/src
/gnu/gcc1/cyg64/x86_64-unknown-cygwin/libstdc++-v3/libsupc++/.libs
-L/cygdrive/c
/users/tim/tim/tim/src/gnu/gcc1/cyg64/x86_64-unknown-cygwin/libstdc++-v3/src
-L/
cygdrive/c/users/tim/tim/tim/src/gnu/gcc1/cyg64/x86_64-unknown-cygwin/libstdc++-
v3/src/.libs -L/usr/lib/w32api
-L/cygdrive/c/users/tim/tim/tim/src/gnu/gcc1/cyg6
4/./gcc -L/lib/../lib -L/usr/lib/../lib -lgcc_s -lgcc -lcygwin -ladvapi32
-lshel
l32 -luser32 -lkernel32 -lgcc_s -lgcc
/cygdrive/c/users/tim/tim/tim/src/gnu/gcc1
/cyg64/./gcc/crtend.o  -Wl,-O1 -Wl,--gc-sections
-Wl,--version-script=libstdc++-
symbols.ver   -o .libs/cygstdc++-6.dll -Wl,--enable-auto-image-base -Xlinker
--o
ut-implib -Xlinker .libs/libstdc++.dll.a
.libs/compatibility.o: In function `std::basic_istream::ignore(long)':
/cygdrive/c/users/tim/tim/tim/src/gnu/gcc1/cyg64/x86_64-unknown-cygwin/libstdc++
-v3/src/../../../../libstdc++-v3/src/c++98/compatibility.cc:67: undefined
refere
nce to `std::basic_istream::sentry::sentry(std::b
asic_istream&, bool)'

[Bug c/66208] macro location not detected

2016-01-13 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66208

--- Comment #3 from Bernd Schmidt  ---
Author: bernds
Date: Wed Jan 13 20:03:26 2016
New Revision: 232345

URL: https://gcc.gnu.org/viewcvs?rev=232345=gcc=rev
Log:
Improve warning locations (PR66208)

PR c/66208
* c-common.c (check_function_nonnull): Remove unnecessary declaration.
Add new arg loc and pass it down as context.
(check_nonnull_arg): Don't mark ctx arg as unused. Use it as a pointer
to the location to use for the warning.
(check_function_arguments): New arg loc.  All callers changed.  Pass
it to check_function_nonnull.
* c-common.h (check_function_arguments): Adjust declaration.

testsuite/
PR c/66208
* c-c++-common/pr66208.c: New file.


Added:
trunk/gcc/testsuite/c-c++-common/pr66208.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/c-common.c
trunk/gcc/c-family/c-common.h
trunk/gcc/c/c-typeck.c
trunk/gcc/cp/call.c
trunk/gcc/cp/typeck.c
trunk/gcc/testsuite/ChangeLog

[Bug target/69014] [4.9/5/6 Regression] gcc.c-torture/execute/991023-1.c FAILs with -Os -fmodulo-sched -fno-tree-vrp

2016-01-13 Thread rth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69014

--- Comment #11 from Richard Henderson  ---
Created attachment 37336
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37336=edit
proposed patch

This appears to work on this test case, producing the expected

  Doloop: doloop pattern clobbers live out

Now pushing it through a larger set of testing.

[Bug tree-optimization/68977] [gomp4] FAIL: c-c++-common/goacc/loop-2.c (internal compiler error)

2016-01-13 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68977

--- Comment #4 from vries at gcc dot gnu.org ---
Author: vries
Date: Wed Jan 13 19:36:46 2016
New Revision: 232343

URL: https://gcc.gnu.org/viewcvs?rev=232343=gcc=rev
Log:
Don't gimplify in ssa mode if seen_error in oacc_xform_loop

2016-01-13  Tom de Vries  

PR tree-optimization/68977
* omp-low.c (oacc_xform_loop):

Modified:
branches/gomp-4_0-branch/gcc/ChangeLog.gomp
branches/gomp-4_0-branch/gcc/omp-low.c

[Bug rtl-optimization/47992] ICE: SIGSEGV in ira_reuse_stack_slot (ira-color.c:2887) with -fweb

2016-01-13 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47992

Bernd Schmidt  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-01-13
 CC||bernds at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |bernds at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #3 from Bernd Schmidt  ---
No longer reproduces, but I think not fixed yet. Testing a patch.

[Bug tree-optimization/69155] [6 Regression] ICE (segfault in gimple_stmt_nonnegative_warnv_p)

2016-01-13 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69155

--- Comment #13 from rguenther at suse dot de  ---
On January 13, 2016 7:08:28 PM GMT+01:00, "jakub at gcc dot gnu.org"
 wrote:
>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69155
>
>--- Comment #12 from Jakub Jelinek  ---
>Created attachment 37335
>  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37335=edit
>gcc6-pr69155-wip.patch
>
>Partial patch I've bootstrapped/regtested on x86_64-linux and
>i686-linux. 
>Either our testsuite coverage is insufficient, or it might be safe to
>only deal
>with PHI arguments and nothing else if we walk in rpo order.
>In that case, as the renamer is not prepared to handle PHIs with
>non-is_gimple_val arguments and renaming them, it might be much easier
>to just
>not use the renamer and simply record the PHIs we still need to update,
>push
>the underlying VAR_DECLs (or extra temporaries for anon SSA_NAMEs) to
>the PHI
>arguments first and get back to them at the end (or immediately once
>the
>SSA_NAME is defined?).

I think it's enough to deal with PHIs and keeping a worklist of unhandled
edge/PHI pairs would indeed work (and use decls as placeholder there).

Richard.

[Bug target/69014] [4.9/5/6 Regression] gcc.c-torture/execute/991023-1.c FAILs with -Os -fmodulo-sched -fno-tree-vrp

2016-01-13 Thread rth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69014

Richard Henderson  changed:

   What|Removed |Added

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

--- Comment #10 from Richard Henderson  ---
I concur that doloop has performed an invalid transformation.
We should be able to detect the clobber of a live register in
the doloop_end sequence.

[Bug fortran/66310] Problems with intrinsic repeat for large number of copies

2016-01-13 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66310

Jerry DeLisle  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jvdelisle at gcc dot 
gnu.org

--- Comment #5 from Jerry DeLisle  ---
Taking this so it shows up on my search.

[Bug middle-end/69156] [6 Regression] gcc.dg/pr59630.c: ICE: verify_gimple failed: non-trivial conversion at assignment with -fno-tree-ccp

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69156

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Jakub Jelinek  ---
Fixed.

[Bug c++/69261] [6 Regression] Copying char arrays during constexpr evaluation does not work reliably

2016-01-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69261

Jason Merrill  changed:

   What|Removed |Added

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

[Bug rtl-optimization/69032] [5/6 Regression] ICE: in cfg_preds_1, at sel-sched-ir.c:4809 with -fsched-pressure -fsel-sched-pipelining -fselective-scheduling

2016-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69032

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4

[Bug lto/69119] More fun with LTO on arm

2016-01-13 Thread tulipawn at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69119

--- Comment #9 from PeteVine  ---
Never mind the last one! :) It seems gcc's LTO wasn't to blame after all.

[Bug c/66208] macro location not detected

2016-01-13 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66208

Bernd Schmidt  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Bernd Schmidt  ---
Fixed.

[Bug tree-optimization/68961] [6 regression] Test case gcc.target/powerpc/pr60203.c fails since r231674

2016-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68961

Martin Sebor  changed:

   What|Removed |Added

 Target||powerpc64*-unknown-linux-gn
   ||u
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-13
 Ever confirmed|0   |1
  Known to fail||6.0

--- Comment #4 from Martin Sebor  ---
Confirmed on powerpc64le:

$ /build/gcc-trunk/gcc/xgcc -B /build/gcc-trunk/gcc -O3 -S -Wall -Wextra
-Wpedantic -mcpu=power8 -o/dev/stdout
/src/gcc/trunk/gcc/testsuite/gcc.target/powerpc/pr60203.c
.file   "pr60203.c"
.machine power8
.abiversion 2
.section".toc","aw"
.section".text"
.align 2
.p2align 4,,15
.globl pack
.type   pack, @function
pack:
xxpermdi 0,2,1,0
addi 9,1,-16
xxpermdi 0,0,0,2
stxvd2x 0,0,9
lfd 1,-16(1)
lfd 2,-8(1)
blr
.long 0
.byte 0,0,0,0,0,0,0,0
.size   pack,.-pack
.align 2
.p2align 4,,15
.globl unpack_0
.type   unpack_0, @function
unpack_0:
blr
.long 0
.byte 0,0,0,0,0,0,0,0
.size   unpack_0,.-unpack_0
.align 2
.p2align 4,,15
.globl unpack_1
.type   unpack_1, @function
unpack_1:
fmr 1,2
blr
.long 0
.byte 0,0,0,0,0,0,0,0
.size   unpack_1,.-unpack_1
    .ident  "GCC: (GNU) 6.0.0 20160113 (experimental)"
.section.note.GNU-stack,"",@progbits

[Bug middle-end/69156] [6 Regression] gcc.dg/pr59630.c: ICE: verify_gimple failed: non-trivial conversion at assignment with -fno-tree-ccp

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69156

--- Comment #6 from Jakub Jelinek  ---
Author: jakub
Date: Wed Jan 13 19:21:59 2016
New Revision: 232342

URL: https://gcc.gnu.org/viewcvs?rev=232342=gcc=rev
Log:
PR tree-optimization/69156
* gimple.c (validate_type): Removed.
(gimple_builtin_call_types_compatible_p): Use
useless_type_conversion_p instead of validate_type.
* value-prof.c (gimple_stringop_fixed_value): Fold
icall_size to correct type.

* gcc.dg/pr69156.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr69156.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/value-prof.c

[Bug c++/69223] ICE with polymorphic lambda

2016-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69223

--- Comment #1 from Jonathan Wakely  ---
Slightly reduced:

#include 
#include 

int main() {
  std::vector> out;

  auto saveChan = [&](auto && f) {
f({});
  };
  saveChan([](decltype(out)::value_type const & i){ return i;});
}

[Bug libstdc++/69266] bootstrap failure undefined reference to `std::basic_ios<char, std::char_traits >::

2016-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69266

--- Comment #1 from Jonathan Wakely  ---
Nothing has changed here, so I don't know why it would start failing on Cygwin.

[Bug c++/69261] [6 Regression] Copying char arrays during constexpr evaluation does not work reliably

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69261

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-13
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
   Target Milestone|--- |6.0
Summary|Copying char arrays during  |[6 Regression] Copying char
   |constexpr evaluation does   |arrays during constexpr
   |not work reliably   |evaluation does not work
   ||reliably
 Ever confirmed|0   |1

--- Comment #3 from Jakub Jelinek  ---
The ICE started with r226949.
Adjusted testcase without need for headers:
typedef __SIZE_TYPE__ size_t;

template 
struct S
{   
  constexpr S() = default;

  template
  constexpr S (char const ()[M]) : data { 0 }
  {
static_assert (M <= N, "size!");
for (size_t i = 0; i != M; i++)
  data[i] = d[i];
  }
  char data[N];
};

template 
constexpr S
s (char const ()[N])
{
  S c {};
  for (size_t i = 0; i != N; i++)
c.data[i] = d[i];
  return c;
}

template 
constexpr auto
concat (S const& s1, S const& s2)
{
  S s (s1.data);
  for (size_t i = 0; i != M; i++)
s.data[N + i - 1] = s2.data[i];
  return s;
}

template 
constexpr auto
concat (char const ()[N], char const ()[M])
{
  S tmp { x };
  for (size_t i = 0; i != M; i++)
tmp.data[N+i-1] = y[i];
  return tmp;
}

int
main ()
{
  auto constexpr s1 = s ("bla");
  auto constexpr s2 = s ("blub");
  S<8> constexpr s1s2 = concat (s1, s2);
  auto constexpr c = concat ("bla", "blub");
  if (__builtin_strcmp (s1.data, "bla")
  || __builtin_strcmp (s2.data, "blub")
  || __builtin_strcmp (s1s2.data, "blablub")
  || __builtin_strcmp (c.data, "blablub"))
__builtin_abort ();
}

[Bug tree-optimization/69067] [6 Regression] ICE in get_def_bb_for_const, at graphite-isl-ast-to-gimple.c:1995

2016-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69067

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug c/69197] Can't compile older

2016-01-13 Thread jia1546 at 163 dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69197

jiaxun  changed:

   What|Removed |Added

 CC||jia1546 at 163 dot com

--- Comment #5 from jiaxun  ---
I also meet this problem and I tried the solution provided by Andrew Pinski and
it works!. Thank you for Andrew Pinski.

[Bug tree-optimization/69270] New: DOM should exploit range information to create more equivalences

2016-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69270

Bug ID: 69270
   Summary: DOM should exploit range information to create more
equivalences
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: law at redhat dot com
  Target Milestone: ---

Given a conditional like

if (a != 0)
   TRUE-ARM
else
   FALSE-ARM

DOM will exploit the knowledge that A must have the value 0 in the FALSE arm of
the conditional.  DOM can not be as aggressive in the TRUE arm because A could
have any value other than zero.

However, if we have range information for A which indicates its range is
[0..1], then DOM can exploit the fact that A must have the value 1 in the TRUE
arm of the conditional.  DOM knows how to do this for booleans where the range
is implicit in the type, but isn't exploiting VRP information to do this on
larger integral types.

Opportunities show up in the adpcm benchmark when compiled with -fsplit-paths
as well as within GCC itself.  Here's the greatly simplified adpcm code:

extern int *stepsizeTable;

void
adpcm_coder (signed char *outdata, int len)
{
  signed char *outp;
  int delta;
  int outputbuffer;
  int bufferstep = 0;
  outp = (signed char *) outdata;
  int step = 0;
  int index = 0;
  int diff = 0;
  for (; len > 0; len--)
{
  delta = 0;
  if (diff >= step)
delta = 4;
  step = stepsizeTable[index];
  if (bufferstep)
outputbuffer = (delta << 4) & 0xf0;
  else
*outp++ = (delta & 0x0f) | outputbuffer;
  bufferstep = !bufferstep;
}
}



Path splitting essentially turns the loop into:

  for (; len > 0; len--)
{
  delta = 0;
  if (diff >= step)
delta = 4;
  step = stepsizeTable[index];
  if (bufferstep)
{
 outputbuffer = (delta << 4) & 0xf0;
 bufferstep = !bufferstep;
}
  else
{
  *outp++ = (delta & 0x0f) | outputbuffer;
  bufferstep = !bufferstep;
}
}

VRP can determine that the bufferstep has the range [0..1] so we can propagate
those constants into each arm of the conditional, causing the !bufferstep
expression to have a constant value.  That's a win.

The astute reader will realize that we've got a flip-flop variable and that
unrolling the loop 1X would allow dramatic simplifications.  In this example
there wouldn't be any code bloat, but in the real adpcm code the bloat would
likely be significant.

[Bug target/69252] [4.9/5/6 Regression] gcc.dg/vect/vect-iv-9.c FAILs with -Os -fmodulo-sched -fmodulo-sched-allow-regmoves -fsched-pressure

2016-01-13 Thread zhroma at ispras dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69252

--- Comment #3 from Roman Zhuykov  ---
I'll try to help. While working with expanding SMS functionality 4-5 years ago
(https://gcc.gnu.org/ml/gcc-patches/2011-07/msg01807.html), I create several
fixes not connected to my main non-doloop-support patch. Unfortunately only two
of that fixes were approved and only one fix was committed.

Could you try this patch first of all:
https://gcc.gnu.org/ml/gcc-patches/2011-12/msg01800.html
This patch suits current trunk.

There are links to other fixes, I can provide newer versions for trunk if
needed.
https://gcc.gnu.org/ml/gcc-patches/2011-09/msg02049.html
https://gcc.gnu.org/ml/gcc-patches/2011-07/msg01804.html
https://gcc.gnu.org/ml/gcc-patches/2011-12/msg00505.html
https://gcc.gnu.org/ml/gcc-patches/2011-12/msg00506.html

[Bug c++/69267] New: [cilkplus] ICE when calling a function with an empty class as an argument

2016-01-13 Thread ryan.burn at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69267

Bug ID: 69267
   Summary: [cilkplus] ICE when calling a function with an empty
class as an argument
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ryan.burn at gmail dot com
  Target Milestone: ---

The below code generates this ICE:

prog.cc: In function 'void g()':
prog.cc:6:21: internal compiler error: in gimplify_expr, at gimplify.c:11058
   _Cilk_spawn f(A{});
 ^

0x8cd198 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/heads/gcc/gcc-source/gcc/gimplify.c:11058
0x74a26a cilk_gimplify_call_params_in_spawned_fn(tree_node**, gimple**,
gimple**)
/home/heads/gcc/gcc-source/gcc/c-family/cilk.c:796
0x6df107 cilk_cp_gimplify_call_params_in_spawned_fn
/home/heads/gcc/gcc-source/gcc/cp/cp-gimplify.c:101
0x6e17b5 cp_gimplify_expr(tree_node**, gimple**, gimple**)
/home/heads/gcc/gcc-source/gcc/cp/cp-gimplify.c:755
0x8c9c75 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/heads/gcc/gcc-source/gcc/gimplify.c:10023
0x8cd336 gimplify_stmt(tree_node**, gimple**)
/home/heads/gcc/gcc-source/gcc/gimplify.c:5616
0x8ca548 gimplify_cleanup_point_expr
/home/heads/gcc/gcc-source/gcc/gimplify.c:5392
0x8ca548 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/heads/gcc/gcc-source/gcc/gimplify.c:10479
0x8cd336 gimplify_stmt(tree_node**, gimple**)
/home/heads/gcc/gcc-source/gcc/gimplify.c:5616
0x8cb082 gimplify_and_add(tree_node*, gimple**)
/home/heads/gcc/gcc-source/gcc/gimplify.c:425
0x8cb082 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/heads/gcc/gcc-source/gcc/gimplify.c:10453
0x8cd336 gimplify_stmt(tree_node**, gimple**)
/home/heads/gcc/gcc-source/gcc/gimplify.c:5616
0x8cb98b gimplify_statement_list
/home/heads/gcc/gcc-source/gcc/gimplify.c:1526
0x8cb98b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
/home/heads/gcc/gcc-source/gcc/gimplify.c:10531
0x8cd336 gimplify_stmt(tree_node**, gimple**)
/home/heads/gcc/gcc-source/gcc/gimplify.c:5616
0x8ce586 gimplify_body(tree_node*, bool)
/home/heads/gcc/gcc-source/gcc/gimplify.c:11245
0x8ce8f7 gimplify_function_tree(tree_node*)
/home/heads/gcc/gcc-source/gcc/gimplify.c:11401
0x7b0057 cgraph_node::analyze()
/home/heads/gcc/gcc-source/gcc/cgraphunit.c:625
0x7b2a7f analyze_functions
/home/heads/gcc/gcc-source/gcc/cgraphunit.c:1080
0x7b3258 symbol_table::finalize_compilation_unit()
/home/heads/gcc/gcc-source/gcc/cgraphunit.c:2531
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.


struct A {};

void f(A) {}

void g() {
  _Cilk_spawn f(A{});
}

int main() {
  return 0;
}


[Bug target/63359] aarch64: 32bit registers in inline asm

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63359

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||documentation

--- Comment #10 from Andrew Pinski  ---
This is a documentation issue rather than anything else.  Also note x86_64 has
some good documentation for inline-asm.  It would be good if someone familiar
with the aarch64 back-end to write up documentation like it was done for x86_64
(Linaro or ARM would be two good companies to do it).

[Bug middle-end/46555] [4.9/5/6 Regression] PHI RTL expansion leads to CSiBE regression

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46555

--- Comment #5 from Andrew Pinski  ---
PRE does some of it via tail merge:
find_duplicates:  duplicate of 
find_duplicates:  duplicate of 
Removing basic block 8
Removing basic block 9

Obviously if you have more complex code it won't do it.
This an example where PRE does it:
int h(void);
int f(int a, int b, int c)
{
  if (a)
return 2;
  h();
  if (b)
return 2;
  h();
  if (c)
return 2;
  h();
  return 4;
}

[Bug tree-optimization/69270] DOM should exploit range information to create more equivalences

2016-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69270

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Jeffrey A. Law  ---
Fixed by trunk commit.

[Bug tree-optimization/69270] DOM should exploit range information to create more equivalences

2016-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69270

--- Comment #1 from Jeffrey A. Law  ---
Author: law
Date: Thu Jan 14 07:38:18 2016
New Revision: 232361

URL: https://gcc.gnu.org/viewcvs?rev=232361=gcc=rev
Log:
[PATCH][PR tree-optimization/69270] Exploit VRP information in DOM

PR tree-optimization/69270
* tree-ssa-dom.c (ssa_name_has_boolean_range): New function.
(record_edge_info): Use it.  Convert boolean_{true,false}_node
to the type of op0.

PR tree-optimization/69270
* gcc.dg/tree-ssa/pr69270.c: New test.

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

[Bug c/67759] [4.9 only] Missing warning "makes pointer from integer without a cast" after multiline assert

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67759

--- Comment #2 from Andrew Pinski  ---
apinski@arm64:~/src/local/gcc/objdir/gcc$ gcc -W -Wall t9.c -S -save-temps
t9.c: In function ‘should_warn’:
t9.c:18:6: warning: passing argument 1 of ‘get’ makes pointer from integer
without a cast [-Wint-conversion]
  get(1);
  ^

t9.c:10:7: note: expected ‘void *’ but argument is of type ‘int’
 void *get(void *con)
   ^~~

apinski@arm64:~/src/local/gcc/objdir/gcc$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/apinski/local-gcc/libexec/gcc/aarch64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: /home/apinski/src/local/gcc/configure
--prefix=/home/apinski/local-gcc --enable-languages=c,c++,fortran
--disable-sanitizer --with-cpu=thunderx+lse
Thread model: posix
gcc version 6.0.0 20160109 (experimental) [trunk revision 232185] (GCC)

[Bug tree-optimization/67323] Use non-unit stride loads by preference when applicable

2016-01-13 Thread michael.collison at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67323

--- Comment #8 from Michael Collison  ---
Hi Richard,

I tried this with trunk and was unable to generate the vld3. What vectorizer
options did you use?

[Bug c/67759] [4.9 only] Missing warning "makes pointer from integer without a cast" after multiline assert

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67759

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic
  Known to work||5.3.0, 6.0
Summary|Missing warning "makes  |[4.9 only] Missing warning
   |pointer from integer|"makes pointer from integer
   |without a cast" after   |without a cast" after
   |multiline assert|multiline assert

--- Comment #1 from Andrew Pinski  ---
Works in 5.3.0 and the trunk just fine.

[Bug tree-optimization/67323] Use non-unit stride loads by preference when applicable

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67323

--- Comment #9 from Andrew Pinski  ---
Note the question comes here is which is better using ldr/str followed by a few
mult or ld3/st3 followed by a few shifts/adds.  I think it depends on the
micro-arch really (at least for aarch32).  In fact I think ldr/str followed by
a few mult is much better for ThunderX and most likely also Cortex-A57 (at
least that is how I read the optimizing manual).

[Bug tree-optimization/68659] [6 regression] FAIL: gcc.dg/graphite/id-pr45230-1.c (internal compiler error)

2016-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68659

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||law at redhat dot com

[Bug target/69030] [6 Regression] ICE on x86_64-linux-gnu at -O2 and above in 32-bit mode (ICE in copy_rtx, at rtl.c:358)

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69030

--- Comment #6 from Jakub Jelinek  ---
I'll note that valtrack.[ch] has some APIs that might be useful, at least they
are used by both RTL DCE and DF note problem computation.

[Bug sanitizer/63646] libsanitizer fails to build for AARCH64:ILP32

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63646

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #5 from Andrew Pinski  ---
Glibc support for ILP32 is changing again so closing as won't fix until the new
set of glibc patches come out.  But note the infastructure for the sanitizers
is broken in that it does not do a good job on detecting the ABI but rather
having to hard coding stuff.

[Bug c++/66487] [6 Regression] Firefox segfault with LTO enabled

2016-01-13 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66487

--- Comment #13 from Jan Hubicka  ---
Author: hubicka
Date: Wed Jan 13 23:47:45 2016
New Revision: 232356

URL: https://gcc.gnu.org/viewcvs?rev=232356=gcc=rev
Log:

PR ipa/66487
* ipa-polymorphic-call.c (inlined_polymorphic_ctor_dtor_block_p):
use block_ultimate_origin
(noncall-stmt_may_be_vtbl_ptr_store): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-polymorphic-call.c

[Bug target/68803] [6 regression] gcc.vect/powerpc/20050603-3.c failures since r230167

2016-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68803

Martin Sebor  changed:

   What|Removed |Added

   Last reconfirmed|2015-12-08 00:00:00 |2016-1-13
  Known to fail||4.9.2, 5.3.0, 6.0

--- Comment #3 from Martin Sebor  ---
On powerpc64le, both 4.9.2 and 5.3.0 emit similar code for the test case as
current trunk.  Since the change referenced in the Description (in r230167) is
a testsuite-only change, is this really a target regression?  It seems that
it's regression in the testsuite, which would presumably make this a lower
priority than some other bugs.

As a data point, though, Clang emits the following with -O2:

addis 4, 2, b@toc@ha
lwz 5, b@toc@l(4)
rlwimi 5, 3, 0, 8, 11
stw 5, b@toc@l(4)
blr

[Bug driver/69265] Option suggestion provides a wrong hint

2016-01-13 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69265

--- Comment #1 from David Malcolm  ---
Candidate patch posted here:
  https://gcc.gnu.org/ml/gcc-patches/2016-01/msg00871.html

[Bug driver/69265] Option suggestion provides a wrong hint

2016-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69265

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
Do you consider for options that take a Joined argument those corresponding
enum values?
I mean say provide hint for
-ftls-model=global-dinamic
to use
-ftls-model=global-dynamic
etc.?  Harder will be options where the various enum values are not listed in
the *.opt file or somewhere easily accessible to the driver, say
-march=sandyridge
to use
-march=sandybridge
The question is if for the joined options you should build all the possible
options joined with all the possible arguments and then hint among that, or if
you just should handle = sign specially and in this case also look at
-sanitize=
vs. -fsanitize= and separately for misspellings in the argument.
The -fsanitize= arguments are even more complicated because they actually don't
allow just one joined string, but allow
-fsanitize=integer-divide-by-zero,address,shift
etc.

[Bug target/54412] Request for 32-byte stack alignment with -mavx on Windows

2016-01-13 Thread c...@spin-digital.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412

c...@spin-digital.com changed:

   What|Removed |Added

 CC||c...@spin-digital.com

--- Comment #14 from c...@spin-digital.com ---

A solution would be to use unaligned loads and stores to stack variables for
256-bit variables and spilled registers. Likely the other compilers are doing
this to make it work. 

I would really appreciate such a solution.

[Bug rtl-optimization/67145] [6 Regression] associativity from pseudo-reg ordering

2016-01-13 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67145

--- Comment #7 from Alan Modra  ---
See https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02055.html

The patch proposed here will again "simplify"

(plus:DI (plus:DI (reg:DI 165 [ val+8 ])
(reg:DI 169 [+8 ]))
(reg:DI 76 ca))

to this

(plus:DI (plus:DI (reg:DI 76 ca)
(reg:DI 165 [ val+8 ]))
(reg:DI 169 [+8 ]))

breaking the match of rs6000.md adddi3_carry_in_internal.

Please do *not* apply this patch as it regresses powerpc64, and please read
comment #1 for why the patch is the wrong place to change associativity.

[Bug target/68803] gcc.vect/powerpc/20050603-3.c failures since r230167

2016-01-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68803

Bill Schmidt  changed:

   What|Removed |Added

Summary|[6 regression]  |gcc.vect/powerpc/20050603-3
   |gcc.vect/powerpc/20050603-3 |.c failures since r230167
   |.c failures since r230167   |

--- Comment #4 from Bill Schmidt  ---
Thanks, Martin.  Agreed, I've removed the [6 regression] designation.

[Bug target/69252] [4.9/5/6 Regression] gcc.dg/vect/vect-iv-9.c FAILs with -Os -fmodulo-sched -fmodulo-sched-allow-regmoves -fsched-pressure

2016-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69252

--- Comment #4 from Martin Sebor  ---
Thanks for your help!  I can confirm that the first patch fixes the problem in
the test cases on powerpc64le.  (I haven't done any other testing with it.)

[Bug target/63347] [4.9 regression] m68k misoptimisation with -fschedule-insns

2016-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63347

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #20 from Jeffrey A. Law  ---
I doubt it matters all that much, but since this got marked as a P2, I went
ahead and backported the change from the trunk to the branch.  I verified that
x86_64 still bootstraps and regression tests and verified the m68k test is
correct (by inspection).

[Bug target/63347] [4.9 regression] m68k misoptimisation with -fschedule-insns

2016-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63347

--- Comment #19 from Jeffrey A. Law  ---
Author: law
Date: Wed Jan 13 22:55:31 2016
New Revision: 232354

URL: https://gcc.gnu.org/viewcvs?rev=232354=gcc=rev
Log:

PR target/63347
* haifa-sched.c (prune_ready_list): If we have a SCHED_GROUP_P insn
that needs to be queued, just queue it for a single cycle.

PR target/63347
* gcc.target/m68k/pr63347.c: New test.


Added:
branches/gcc-4_9-branch/gcc/testsuite/gcc.target/m68k/pr63347.c
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/haifa-sched.c
branches/gcc-4_9-branch/gcc/testsuite/ChangeLog

[Bug lto/69254] internal compiler error: in streamer_get_builtin_tree, at tree-streamer-in.c:1144

2016-01-13 Thread sasha.levin at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69254

--- Comment #2 from Sasha Levin  ---
Created attachment 37337
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37337=edit
preprocessed source

[Bug lto/69254] [6 Regression] internal compiler error: in streamer_get_builtin_tree, at tree-streamer-in.c:1144

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69254

--- Comment #6 from Andrew Pinski  ---
gcc  t.c  -std=gnu89  -flto -fsanitize=shift -c; gcc -flto -flto=128 t.o

Is enough to reproduce the ICE.

[Bug lto/69254] [6 Regression] ICE in streamer_get_builtin_tree when using -fsanitize=shift on the compile side only

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69254

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-14
 Ever confirmed|0   |1

--- Comment #8 from Andrew Pinski  ---
.

[Bug c/67729] -Wformat should warn for %Ns where the buffer size is known to be less than N in size

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67729

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-14
Summary|scanf is missing buffer |-Wformat should warn for
   |length sanity check ?   |%Ns where the buffer size
   ||is known to be less than N
   ||in size
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #1 from Andrew Pinski  ---
Confirmed.

[Bug target/69269] [6 Regression] ICE on ibm-ldouble.c in extract_constrain_insn_cached, at recog.c:2201

2016-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69269

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||build, ice-on-valid-code
 Target||powerpc64-linux-gnu
  Component|bootstrap   |target
   Target Milestone|--- |6.0
Summary|ICE on ibm-ldouble.c in |[6 Regression] ICE on
   |extract_constrain_insn_cach |ibm-ldouble.c in
   |ed, at recog.c:2201 |extract_constrain_insn_cach
   ||ed, at recog.c:2201

--- Comment #1 from Andrew Pinski  ---
(In reply to Martin Sebor from comment #0)
> Today's trunk fails in stage1-bubble on powerpc64 (powerpc64le works):

Because powerpc64le does not enable the 32bit multi-lib.

[Bug fortran/69268] New: Sourced allocation calls function twice

2016-01-13 Thread townsend at astro dot wisc.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69268

Bug ID: 69268
   Summary: Sourced allocation calls function twice
   Product: gcc
   Version: 5.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: townsend at astro dot wisc.edu
  Target Milestone: ---

Created attachment 37338
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37338=edit
Source code of program reproducing the problem

The attached program demonstrates that, in a sourced allocation based on a
function call, the function is called twice. Example output:

 called:   1
 called:   2

I believe this may gave been fixed in 6.0, but 5.3 seems to still have the
problem.

  1   2   3   >