[Bug debug/79000] ICE: in gen_member_die, at dwarf2out.c:23995

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79000

--- Comment #2 from Richard Biener  ---
Author: rguenth
Date: Mon Jan  9 08:22:58 2017
New Revision: 244217

URL: https://gcc.gnu.org/viewcvs?rev=244217&root=gcc&view=rev
Log:
2017-01-09  Richard Biener  

PR debug/79000
* dwarf2out.c (is_cxx): New overload with context.
(is_naming_typedef_decl): Use it.

* g++.dg/lto/pr79000_0.C: New testcase.
* g++.dg/lto/pr79000_1.c: Likewise.

Added:
trunk/gcc/testsuite/g++.dg/lto/pr79000_0.C
trunk/gcc/testsuite/g++.dg/lto/pr79000_1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/78997] [7 regression] ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78997

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Mon Jan  9 08:25:13 2017
New Revision: 244218

URL: https://gcc.gnu.org/viewcvs?rev=244218&root=gcc&view=rev
Log:
2017-01-09  Richard Biener  

PR tree-optimization/78997
* tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
name condition properly.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr78997.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-slp.c

[Bug tree-optimization/78997] [7 regression] ICE on valid code at -O3 on x86_64-linux-gnu: verify_gimple failed

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78997

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug debug/79000] ICE: in gen_member_die, at dwarf2out.c:23995

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79000

Richard Biener  changed:

   What|Removed |Added

  Known to work||7.0
  Known to fail|7.0 |6.3.0

--- Comment #3 from Richard Biener  ---
Fixed on trunk.  Will eventually backport to GCC 6.

[Bug c++/79002] Weird c++ assembly code generated for tail call

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79002

Richard Biener  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #5 from Richard Biener  ---
Looking at

  NEXT_PASS (pass_cd_dce);
  NEXT_PASS (pass_early_ipa_sra);
  NEXT_PASS (pass_tail_recursion);
  NEXT_PASS (pass_convert_switch);
  NEXT_PASS (pass_cleanup_eh);
  NEXT_PASS (pass_profile);
  NEXT_PASS (pass_local_pure_const);
  /* Split functions creates parts that are not run through
 early optimizations again.  It is thus good idea to do this
  late.  */
  NEXT_PASS (pass_split_functions);
  POP_INSERT_PASSES ()

I think neither switch-conversion nor tail-recursion should enable extra
EH cleanup opportunities so moving cleanup_eh before tail-recursion might
work.

Of course the question is why writing (i) makes i addressable in the first
place... (which is why I left this categorized as C++ FE issue)

[Bug rtl-optimization/79003] [7 Regression] r238991 breaks ODR

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79003

--- Comment #8 from Richard Biener  ---
(In reply to Martin Liška from comment #4)
> Just to document, I see another Werror in LTO bootstrap:
> 
> ../../gcc/predict.c: In function ‘set_even_probabilities’:
> ../../gcc/predict.c:798:8: error: ‘e’ may be used uninitialized in this
> function [-Werror=maybe-uninitialized]
>edge e;
> ^
> 
> Where LIM does following transformation:
> 
>[15.14%]:
>   _1 = &bb_23(D)->succs;
>   if (_1 == 0B)
> goto ; [0.04%]
>   else
> goto ; [99.96%]
> 
>[15.13%]:
>   _79 = MEM[(struct vec * *)bb_23(D) + 8B];
>   e_lsm.1284_111 = e;
>   e_lsm.1285_130 = 0;
>   goto ; [100.00%]
> 
>[0.04%]:
>   _ZL12ei_container13edge_iterator.isra.19.part.20 ();
> 
>[99.96%]:
>   # nedges_90 = PHI 
>   # _93 = PHI <_94(14), 0(35)>
>   # e_lsm.1284_2 = PHI 
>   # e_lsm.1285_15 = PHI 
>   if (_79 != 0B)
> goto ; [70.00%]
>   else
> goto ; [30.00%]
> 
> I guess it's a false positive.

Or PR39612.

[Bug debug/79015] ICE in get_insn_template in gcc/final.c:2081

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79015

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-09
Version|unknown |7.0
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.  foo is not necessary.

[Bug tree-optimization/79014] Absent vectorization with memory loads

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79014

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-09
 Blocks||53947
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
The issue is that GCC does not recognize s3[R[z] & mask] as valid gather
instruction (it does not understand the bitwise and doing scalar evolution
analysis for a start which it does to do dependence analysis).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

[Bug rtl-optimization/79012] basic block reordering causes suboptimal code

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79012

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Target||x86_64-*-*, i?86-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-09
  Component|middle-end  |rtl-optimization
 Ever confirmed|0   |1

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

[Bug tree-optimization/79007] [7 regression] gcc.dg/tree-ssa/dse-points-to.c fails starting with r244067

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79007

--- Comment #5 from Richard Biener  ---
The pt_null thing for sure.

[Bug c++/79005] Use of a captured variable within nested generic lambdas provokes internal compiler error.

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79005

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-09
 Ever confirmed|0   |1
  Known to fail||6.2.0, 7.0

--- Comment #4 from Richard Biener  ---
Confirmed.  clang accepts the code.  gcc 4.8 rejects it (incomplete support for
auto in lambdas).

[Bug tree-optimization/79028] Un-optimal/ incorrect forward propagation

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79028

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-09
 CC||rguenth at gcc dot gnu.org
  Component|c   |tree-optimization
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.  This is folding via match-and-simplify

  ticks_16 = _4 / 1000;
  instance_14(D)->dio_next_delay = ticks_16;
  _5 = ticks_16 / 2;
  _6 = ticks_16 / 2;

to

  ticks_16 = _4 / 1000;
  instance_14(D)->dio_next_delay = ticks_16;
  _5 = _4 / 2000;
  _6 = _4 / 2000;

which would be ok if ticks_16 would become dead but it isn't.

forwprop misses global liveness analysis to do a better than nothing cost model
so it blindly assumes there'll be followup optimization opportunities.

It's hard to fix cases like this without pessimizing other cases (without
actually implementing such global cost modeling).

[Bug sanitizer/69539] ICE in expand_UBSAN_NULL, at internal-fn.c:202

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69539

--- Comment #8 from Jakub Jelinek  ---
I think this ought to be fixed by r243514, i.e. PR78708.

[Bug c/79027] fold-const.c:11104:1: internal compiler error: Floating point exception

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79027

--- Comment #1 from Richard Biener  ---
Is this stage2 or stage3?  To me it looks like a miscompile of GCC ...

[Bug rtl-optimization/78255] [5/6 regression] Indirect sibling call causing wrong code generation for ARM

2017-01-09 Thread avieira at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78255

--- Comment #14 from avieira at gcc dot gnu.org ---
Author: avieira
Date: Mon Jan  9 09:58:54 2017
New Revision: 244220

URL: https://gcc.gnu.org/viewcvs?rev=244220&root=gcc&view=rev
Log:
PR78255: Make postreload aware of NO_FUNCTION_CSE

gcc/ChangeLog:
2017-01-09  Andre Vieira 

Backport from mainline
2016-12-09  Andre Vieira 

PR rtl-optimization/78255
* gcc/postreload.c (reload_cse_simplify): Do not CSE a function if
NO_FUNCTION_CSE is true.

gcc/testsuite/ChangeLog:
2017-01-09  Andre Vieira 

Backport from mainline
2016-12-20  Andre Vieira  

* gcc.target/arm/pr78255-2.c: Fix to work for targets
that do not optimize for tailcall.

2017-01-09  Andre Vieira 

Backport from mainline
2016-12-09  Andre Vieira 

PR rtl-optimization/78255
* gcc.target/aarch64/pr78255.c: New.
* gcc.target/arm/pr78255-1.c: New.
* gcc.target/arm/pr78255-2.c: New.


Added:
branches/gcc-6-branch/gcc/testsuite/gcc.target/aarch64/pr78255.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/arm/pr78255-1.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/arm/pr78255-2.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/postreload.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug pch/78970] GCC crashes if input file is dash

2017-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78970

--- Comment #8 from Martin Liška  ---
(In reply to jos...@codesourcery.com from comment #7)
> This change causes a regression testing glibc.  glibc uses "gcc -E -x 
> c-header -", which now results in an error "cannot use '-' as input 
> filename for a precompiled header".  But that use with -E is not creating 
> a precompiled header, so should not result in an error.

Yes, sorry for the breakage. I'll fix that.

[Bug c/79029] New: [7 Regression] UB in gimple-ssa-sprintf.c:582:17: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int';

2017-01-09 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79029

Bug ID: 79029
   Summary: [7 Regression] UB in gimple-ssa-sprintf.c:582:17:
runtime error: negation of -9223372036854775808 cannot
be represented in type 'long int';
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
CC: msebor at gcc dot gnu.org
  Target Milestone: ---

Since r240298 bootstrap-ubsan shows:

gcc/gimple-ssa-sprintf.c:582:17: runtime error: negation of
-9223372036854775808 cannot be represented in type 'long int'; cast to an
unsigned type to negate this value to itself

[Bug tree-optimization/78529] [7 Regression] gcc.c-torture/execute/builtins/strcat-chk.c failed with lto/O2

2017-01-09 Thread jgreenhalgh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78529

--- Comment #27 from James Greenhalgh  ---
(In reply to Jim Wilson from comment #26)
> I can reproduce the problem with this new reduced testcase.  I don't have
> knowledge of all of the details how the gcc implementation of LTO works, but
> my understanding goes something like this.

That fits with my understanding of this test failure when I looked at it in
December.

[Bug tree-optimization/78938] [7 Regression] ICE in expand_vec_cond_expr, at optabs.c:5636 w/ -mavx512bw -ftree-loop-vectorize -O1

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78938

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Mon Jan  9 11:44:52 2017
New Revision: 244223

URL: https://gcc.gnu.org/viewcvs?rev=244223&root=gcc&view=rev
Log:
PR tree-optimization/78938
* tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
{EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
fixes.

* gcc.dg/vect/pr78938.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/vect/pr78938.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-stmts.c

[Bug tree-optimization/78938] [7 Regression] ICE in expand_vec_cond_expr, at optabs.c:5636 w/ -mavx512bw -ftree-loop-vectorize -O1

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78938

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug other/79030] New: Compilation failure due to virtual memory exhaustion

2017-01-09 Thread aurelien at aurel32 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79030

Bug ID: 79030
   Summary: Compilation failure due to virtual memory exhaustion
   Product: gcc
   Version: 6.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aurelien at aurel32 dot net
  Target Milestone: ---
  Host: mipsel-linux-gnu
Target: mipsel-linux-gnu
 Build: mipsel-linux-gnu

The attached testcase fails to compile on a 32-bit MIPS machine due to virtual
memory exhaustion. The machine has plenty of available memory, but the virtual
address space is limited to 2GB:

$ g++ -O2 -fno-var-tracking-assignments -g -c ceph_dencoder.ii
cc1plus: out of memory allocating 3195232 bytes after a total of 32043008 bytes
$

However it compiles successfully when tunning ggc-min-expand:
$ g++ -O2 -fno-var-tracking-assignments -g -c ceph_dencoder.ii --param
ggc-min-expand=5
$

[Bug other/79030] Compilation failure due to virtual memory exhaustion

2017-01-09 Thread aurelien at aurel32 dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79030

--- Comment #1 from Aurelien Jarno  ---
Created attachment 40480
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40480&action=edit
Testcase

[Bug c++/79030] Compilation failure due to virtual memory exhaustion

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79030

Richard Biener  changed:

   What|Removed |Added

   Keywords||memory-hog
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-09
  Component|other   |c++
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
Can you figure out which pass / function uses so much memory?  Does using -O1
help?  The testcase is positively big, on x86_64 (with -m32) it uses >2GB of
memory even at -O[01], that is, without -g!  -fsyntax-only tops at 1.7GB
already
with reduced GC params, otherwise goes close to 2GB (so I mostly blame the C++
FE here).

[Bug c/79029] [7 Regression] UB in gimple-ssa-sprintf.c:582:17: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int';

2017-01-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79029

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug c++/79031] New: [C++17] ICE with class template deduction for std::vector and std::initializer_list

2017-01-09 Thread g++bug at oxyware dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79031

Bug ID: 79031
   Summary: [C++17] ICE with class template deduction for
std::vector and std::initializer_list
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: g++bug at oxyware dot com
  Target Milestone: ---

#include 

int main()
{
  std::vector v({4});
}

//g++ 7.0.0 20170108 (experimental) 

Compilation with g++ version "7.0.0 20170108 (experimental)" and -std=c++1z
fails with:

: In function 'std::vector(std::initializer_list<_Tp>, const
allocator_type&)-> std::vector<_Tp, _Alloc> [with _Tp = int; _Alloc =
std::allocator; std::vector<_Tp, _Alloc>::allocator_type =
std::allocator]':
:5:20: internal compiler error: in tsubst_copy, at cp/pt.c:14953
std::vector v({4});
^
mmap: Cannot allocate memory
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
Compiler exited with result code 1

This compiles successfully with std::vector v({4}); but not when
attempting to deduce the initializer_list type.

Possibly related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78894

[Bug c/79027] fold-const.c:11104:1: internal compiler error: Floating point exception

2017-01-09 Thread dave.anglin at bell dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79027

--- Comment #2 from dave.anglin at bell dot net ---
On 2017-01-09, at 4:09 AM, rguenth at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79027
> 
> --- Comment #1 from Richard Biener  ---
> Is this stage2 or stage3?  To me it looks like a miscompile of GCC ...

It is stage2 built with 6.3 as bootstrap compiler.

--
John David Anglin   dave.ang...@bell.net

[Bug c/79027] fold-const.c:11104:1: internal compiler error: Floating point exception

2017-01-09 Thread dave.anglin at bell dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79027

--- Comment #3 from dave.anglin at bell dot net ---
Doesn't occur with --enable-checking=release.

--
John David Anglin   dave.ang...@bell.net

[Bug libstdc++/66414] string::find ten times slower than strstr

2017-01-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66414

--- Comment #7 from Jonathan Wakely  ---
Author: redi
Date: Mon Jan  9 13:05:58 2017
New Revision: 244225

URL: https://gcc.gnu.org/viewcvs?rev=244225&root=gcc&view=rev
Log:
PR66414 optimize std::string::find

2017-01-09  Jonathan Wakely  
Aditya Kumar  

PR libstdc++/66414
* include/bits/basic_string.tcc
(basic_string::find(const CharT*, size_type, size_type)): Optimize.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/basic_string.tcc

[Bug pch/78970] GCC crashes if input file is dash

2017-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78970

--- Comment #9 from Martin Liška  ---
Created attachment 40481
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40481&action=edit
Untested patch for the new issue

[Bug bootstrap/70829] LTO bootstrap failure

2017-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70829

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||marxin at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #4 from Martin Liška  ---
Should be fixed.

[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2017-01-09 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626

--- Comment #10 from Arseny Solokha  ---
AFAICT, the patch was ACKed by Segher on December 15th
(https://gcc.gnu.org/ml/gcc-patches/2016-12/msg01337.html). Is there something
that still prevents it from being committed?

[Bug tree-optimization/72866] Compile time hog w/ -O3 (-Ofast)

2017-01-09 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72866

Arseny Solokha  changed:

   What|Removed |Added

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

--- Comment #10 from Arseny Solokha  ---
Fixed on all affected branches four months ago.

[Bug c++/79031] [7 Regression] [C++17] ICE with class template deduction for std::vector and std::initializer_list

2017-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79031

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-09
 CC||jason at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
   Target Milestone|--- |7.0
Summary|[C++17] ICE with class  |[7 Regression] [C++17] ICE
   |template deduction for  |with class template
   |std::vector and |deduction for std::vector
   |std::initializer_list   |and std::initializer_list
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, started with r240756. Probably dup of PR78894.

[Bug c++/79024] alignas / alignof report wrong alignment for 64bit integer types for 32bit target

2017-01-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79024

--- Comment #5 from Jonathan Wakely  ---
Please read 3.11 more carefully.

"The alignment required for a type might be different when it is used as the
type of a complete object and when it is used as the type of a subobject. [...]
The result of the alignof operator reflects the alignment requirement of the
type in the complete-object case."

[Bug pch/78970] GCC crashes if input file is dash

2017-01-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78970

--- Comment #10 from Martin Liška  ---
Author: marxin
Date: Mon Jan  9 15:24:35 2017
New Revision: 244227

URL: https://gcc.gnu.org/viewcvs?rev=244227&root=gcc&view=rev
Log:
Do not error when -E provided (PR pch/78970).

2017-01-09  Martin Liska  

PR pch/78970
* gcc.c (driver_handle_option): Handle OPT_E and set
have_E.
(lookup_compiler): Do not show error message with have_E.

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

[Bug c++/78948] [C++17] constexpr if instantiating too eagerly

2017-01-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78948

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #6 from Jason Merrill  ---
Fixed.

[Bug tree-optimization/79007] gcc.dg/tree-ssa/dse-points-to.c fails starting with r244067

2017-01-09 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79007

Jeffrey A. Law  changed:

   What|Removed |Added

Summary|[7 regression]  |gcc.dg/tree-ssa/dse-points-
   |gcc.dg/tree-ssa/dse-points- |to.c fails starting with
   |to.c fails starting with|r244067
   |r244067 |

--- Comment #6 from Jeffrey A. Law  ---
But it's not a regression relative to any release.

[Bug tree-optimization/78608] [7 Regression] gimple-ssa-sprintf.c:570:17: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int'

2017-01-09 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78608

--- Comment #7 from Jeffrey A. Law  ---
*** Bug 79029 has been marked as a duplicate of this bug. ***

[Bug c/79029] [7 Regression] UB in gimple-ssa-sprintf.c:582:17: runtime error: negation of -9223372036854775808 cannot be represented in type 'long int';

2017-01-09 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79029

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||law at redhat dot com
 Resolution|--- |DUPLICATE

--- Comment #1 from Jeffrey A. Law  ---
Almost certainly a duplicate.

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

[Bug c++/78948] [C++17] constexpr if instantiating too eagerly

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78948

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Mon Jan  9 16:24:19 2017
New Revision: 244228

URL: https://gcc.gnu.org/viewcvs?rev=244228&root=gcc&view=rev
Log:
PR c++/78948
* g++.dg/cpp1z/constexpr-if10.C: Fix PR number in comment.
(main): Use int* instead of long long.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C

[Bug rtl-optimization/79032] New: Unaligned memory access in code generated for sparc 32 with LRA

2017-01-09 Thread cederman at gaisler dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79032

Bug ID: 79032
   Summary: Unaligned memory access in code generated for sparc 32
with LRA
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: cederman at gaisler dot com
  Target Milestone: ---
Target: sparc

Hi,

The following code compiled with -O2 -mcpu=v8 -mlra causes an unaligned memory
access:

typedef struct {
  short a;
  long long b;
  short c;
  _Bool d;
  unsigned short e;
  long *f
} g;

h(g *i) {
  long a = 1;
  a /= i->e;
  i->f[a]--;
  return 0;
}

With -mlra:

mov 1, %g1
sra %g1, 31, %g2
wr  %g2, 0, %y
ld  [%o0+18], %g2 <- unaligned
nop
nop
sdiv%g1, %g2, %g1

With -mno-lra:

lduh[%o0+20], %g2 <- aligned
ld  [%o0+24], %g3
mov 1, %g1
mov 0, %o0
sra %g1, 31, %g4
wr  %g4, 0, %y
nop
nop
nop
sdiv%g1, %g2, %g1

[Bug c++/79024] alignas / alignof report wrong alignment for 64bit integer types for 32bit target

2017-01-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79024

--- Comment #6 from Jonathan Wakely  ---
Although Bug 69763 (and https://llvm.org/bugs/show_bug.cgi?id=26547 for clang)
are still open because this is inconsistent with C.

[Bug middle-end/32003] Undocumented -fdump-tree options

2017-01-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32003

--- Comment #6 from Martin Sebor  ---
That sounds good to me.  Unless someone beats me to it, I can see about making
those changes in stage 4 after I'm done with all my stage 3 work.

[Bug libstdc++/79017] Old PowerMac G5, MacPorts GCC 5.4, C++11 and "std::log2 has not been declared"

2017-01-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79017

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #16 from Jonathan Wakely  ---
Fixed for gcc 7

[Bug libstdc++/79017] Old PowerMac G5, MacPorts GCC 5.4, C++11 and "std::log2 has not been declared"

2017-01-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79017

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #16 from Jonathan Wakely  ---
Fixed for gcc 7

--- Comment #17 from Jonathan Wakely  ---
Author: redi
Date: Mon Jan  9 17:15:58 2017
New Revision: 244231

URL: https://gcc.gnu.org/viewcvs?rev=244231&root=gcc&view=rev
Log:
PR79017 workaround incomplete C99 math on darwin

PR libstdc++/79017
* acinclude.m4 (GLIBCXX_CHECK_C99_TR1): Check for llrint and llround
functions separately on darwin and if they're missing define
_GLIBCXX_NO_C99_ROUNDING_FUNCS.
* config.h.in: Regenerate.
* configure: Regenerate.
* include/c_global/cmath [_GLIBCXX_NO_C99_ROUNDING_FUNCS] (llrint)
(llrintf, llrintl, llround, llroundf, llroundl): Do not define.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/acinclude.m4
trunk/libstdc++-v3/config.h.in
trunk/libstdc++-v3/configure
trunk/libstdc++-v3/include/c_global/cmath

[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2017-01-09 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626

--- Comment #11 from Segher Boessenkool  ---
It is ready to be committed AFAIK; same for the related PR78727.

[Bug c++/79033] New: asan.c not compiling with make BOOT_CFLAGS='-O0' (or '-O1')

2017-01-09 Thread lkrupp at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79033

Bug ID: 79033
   Summary: asan.c not compiling with make BOOT_CFLAGS='-O0' (or
'-O1')
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: lkrupp at gcc dot gnu.org
  Target Milestone: ---

When building with:

make BOOT_CFLAGS='-O0' (or '-O1')

This command:

/home/louis/gcc_obj/./prev-gcc/xg++ -B/home/louis/gcc_obj/./prev-gcc/
-B/home/louis/gcc_inst/x86_64-pc-linux-gnu/bin/ -nostdinc++
-B/home/louis/gcc_obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-B/home/louis/gcc_obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/home/louis/gcc_obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu
 -I/home/louis/gcc_obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/include 
-I/home/louis/gcc_trunk/libstdc++-v3/libsupc++
-L/home/louis/gcc_obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/home/louis/gcc_obj/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs
-fno-PIE -c   -O1 -gtoggle -DIN_GCC -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common
 -DHAVE_CONFIG_H -I. -I. -I../../gcc_trunk/gcc -I../../gcc_trunk/gcc/.
-I../../gcc_trunk/gcc/../include -I../../gcc_trunk/gcc/../libcpp/include 
-I../../gcc_trunk/gcc/../libdecnumber -I../../gcc_trunk/gcc/../libdecnumber/bid
-I../libdecnumber -I../../gcc_trunk/gcc/../libbacktrace   -o asan.o -MT asan.o
-MMD -MP -MF ./.deps/asan.TPo ../../gcc_trunk/gcc/asan.c

gets this error:

../../gcc_trunk/gcc/asan.c:1065:1: error: ‘%d’ directive output may be
truncated writing between 1 and 11 bytes into a region of size 10
[-Werror=format-truncation=]
 asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb,
 ^~
../../gcc_trunk/gcc/asan.c:1065:1: note: using the range [1, -2147483648] for
directive argument
../../gcc_trunk/gcc/asan.c:1163:26: note: format output between 22 and 32 bytes
into a destination of size 30
   use_after_return_class);

The problem is with this code:

1071   char buf[30];
...
1080   int use_after_return_class = -1;
...
1162   snprintf (buf, sizeof buf, "__asan_stack_malloc_%d",
1163 use_after_return_class);

If use_after_return_class is in fact a negative 10-digit number, buf would
overflow. With -O2, the compiler presumably knows more about the value of
use_after_return_class, and asan.c compiles without errors.

Changing buf to an array of length 31 makes the error go away, but I believe
the length should be 32 to leave room for the terminating null byte.

[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-09 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696

vehre at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 CC||vehre at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |vehre at gcc dot gnu.org

[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-09 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 CC||danlnagle at me dot com

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

[Bug fortran/67073] short program produces ICE

2017-01-09 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67073

vehre at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from vehre at gcc dot gnu.org ---
Same cause as pr70696.

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

[Bug fortran/70696] [Coarray] ICE on EVENT POST of host-associated EVENT_TYPE coarray

2017-01-09 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70696

--- Comment #7 from vehre at gcc dot gnu.org ---
The causes for both pr67073 and this one were the backend_decl of symbol to
lock/event on being created. A small patch to come will solve this shortly.

[Bug tree-optimization/79034] New: ICE segfault in gcc 6.x

2017-01-09 Thread sisnkemp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79034

Bug ID: 79034
   Summary: ICE segfault in gcc 6.x
   Product: gcc
   Version: 6.3.1
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sisnkemp at gmail dot com
  Target Milestone: ---

Created attachment 40482
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40482&action=edit
code example

The attachment crashes on GNU/Linux x86_64 and OpenBSD/amd64 with gcc 6.1
through gcc 6.3.
Compile it with gcc -c -O2

gcc 7 for GNU/Linux x86_84, as well as gcc 4.9.3 do not crash.

My gdb backtraces is incomplete for some reason, but it seems to be in an SSA
pass:

With gdb 6.3:
Program received signal SIGSEGV, Segmentation fault.
0x121591e37b96 in hash_table::find_slot_with_hash () from cc1plus
(gdb) where
#0  0x121591e37b96 in hash_table::find_slot_with_hash () from cc1plus
#1  0x121591e9fe61 in hash_table::find_slot_with_hash () from cc1plus
#2  0x121823f7e5c0 in ?? ()
#3  0x in ?? ()

With gdb 7.12
Program received signal SIGSEGV, Segmentation fault.
0x1d13b9337b96 in ?? ()
(gdb) where
#0  0x1d13b9337b96 in ?? ()
#1  0x1d13b939fe61 in ?? ()
#2  0x1d13b93a0d08 in ssa_propagate(ssa_prop_result (*)(gimple*,
edge_def**, tree_node**), ssa_prop_result (*)(gphi*)) ()
#3  0x1d13b93371cd in ?? ()
#4  0x1d13b91a5bcf in execute_one_pass(opt_pass*) ()
#5  0x1d13b91a6148 in ?? ()
#6  0x1d13b91a615a in ?? ()
#7  0x1d13b91a61ad in execute_pass_list(function*, opt_pass*) ()
#8  0x1d13b8f18e95 in cgraph_node::expand() ()
#9  0x1d13b8f1a35e in ?? ()
#10 0x1d13b8f1bf9e in symbol_table::finalize_compilation_unit() ()
#11 0x1d13b9260b96 in ?? ()
#12 0x1d13b9262645 in toplev::main(int, char**) ()
#13 0x1d13b9911217 in main ()

[Bug ipa/78599] [7 Regression] hwint.h:292:72: runtime error: shift exponent 64 is too large for 64-bit type 'long int'

2017-01-09 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78599

--- Comment #10 from Martin Jambor  ---
Author: jamborm
Date: Mon Jan  9 18:26:37 2017
New Revision: 244232

URL: https://gcc.gnu.org/viewcvs?rev=244232&root=gcc&view=rev
Log:
[PR 78365] Prudent type handling in IPA VR-prop

2017-01-09  Martin Jambor  

PR ipa/78365
PR ipa/78599
* ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
* ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
(propagate_vr_accross_jump_function): Use the above function for all
value range computations for pass-through jump functions and type
converasion from explicit value range values.
(ipcp_propagate_stage): Do not attempt to deduce types of formal
parameters from TYPE_ARG_TYPES.
* ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
(ipa_write_node_info): Stream type of the actual argument.
(ipa_read_node_info): Likewise. Also remove trailing whitespace.

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



Added:
trunk/gcc/testsuite/gcc.dg/torture/pr78365.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-cp.c
trunk/gcc/ipa-prop.c
trunk/gcc/ipa-prop.h
trunk/gcc/testsuite/ChangeLog

[Bug ipa/78365] [7 Regression] ICE in determine_value_range, at tree-ssa-loo p-niter.c:413

2017-01-09 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78365

--- Comment #8 from Martin Jambor  ---
Author: jamborm
Date: Mon Jan  9 18:26:37 2017
New Revision: 244232

URL: https://gcc.gnu.org/viewcvs?rev=244232&root=gcc&view=rev
Log:
[PR 78365] Prudent type handling in IPA VR-prop

2017-01-09  Martin Jambor  

PR ipa/78365
PR ipa/78599
* ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
* ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
(propagate_vr_accross_jump_function): Use the above function for all
value range computations for pass-through jump functions and type
converasion from explicit value range values.
(ipcp_propagate_stage): Do not attempt to deduce types of formal
parameters from TYPE_ARG_TYPES.
* ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
(ipa_write_node_info): Stream type of the actual argument.
(ipa_read_node_info): Likewise. Also remove trailing whitespace.

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



Added:
trunk/gcc/testsuite/gcc.dg/torture/pr78365.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-cp.c
trunk/gcc/ipa-prop.c
trunk/gcc/ipa-prop.h
trunk/gcc/testsuite/ChangeLog

[Bug ipa/78599] [7 Regression] hwint.h:292:72: runtime error: shift exponent 64 is too large for 64-bit type 'long int'

2017-01-09 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78599

--- Comment #11 from Martin Jambor  ---
I believe this is fixed but I still need to build an instrumented compiler to
verify.

[Bug ipa/78365] [7 Regression] ICE in determine_value_range, at tree-ssa-loo p-niter.c:413

2017-01-09 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78365

Martin Jambor  changed:

   What|Removed |Added

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

--- Comment #9 from Martin Jambor  ---
Fixed.

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

2017-01-09 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68803

Segher Boessenkool  changed:

   What|Removed |Added

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

--- Comment #10 from Segher Boessenkool  ---
Fixed.

[Bug c++/79033] asan.c not compiling with make BOOT_CFLAGS='-O0' (or '-O1')

2017-01-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79033

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-01-09
 CC||msebor at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Sebor  ---
Confirmed.  The warning is the result of splitting -Wformat-truncation out of
the -Wformat-length warning in r244210.  Based on the note ("format output
between 22 and 32 bytes") 32 sounds like the right size.  Let me do a build
with BOOT_CFLAGS='-O0' to see if there are  any other problems and fix them
all.

[Bug c++/79035] New: Rejects valid code due to failure to use user const conversion template operator

2017-01-09 Thread vz at quantitativesystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79035

Bug ID: 79035
   Summary: Rejects valid code due to failure to use user const
conversion template operator
   Product: gcc
   Version: 6.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vz at quantitativesystems dot com
  Target Milestone: ---

In the following example, the conversion int value2 = cdc fails, tested in many
versions of g++:

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

void instantiate(DualConverter &mdc, const DualConverter &cdc) {
int &modif1 = mdc;
const int &const1 = mdc;
int value1 = mdc;
const int &const2 = cdc;
int value2 = cdc; // The compiler can't perform this conversion
}

g++ 6.3.0 gives this error:
src/f5.cpp: In function ‘void instantiate(DualConverter&, const
DualConverter&)’:
src/f5.cpp:11:18: error: cannot convert ‘const DualConverter’ to ‘int’ in
initialization
 int value2 = cdc;
  ^~~

The older g++ 4.8.3 gives a perhaps more informative error:
src/f5.cpp: In function ‘void instantiate(DualConverter&, const
DualConverter&)’:
src/f5.cpp:11:18: error: invalid user-defined conversion from ‘const
DualConverter’ to ‘int’ [-fpermissive]
 int value2 = cdc;
  ^
src/f5.cpp:2:26: note: candidate is: DualConverter::operator T&() [with T =
int] 
 template operator T &();
  ^
src/f5.cpp:2:26: note:   no known conversion for implicit ‘this’ parameter from
‘const DualConverter*’ to ‘DualConverter*’
src/f5.cpp:11:18: error: passing ‘const DualConverter’ as ‘this’ argument of
‘DualConverter::operator T&() [with T = int]’ discards qualifiers
[-fpermissive]
 int value2 = cdc;


All versions of clang tested including 3.9 correctly compile this example.

I suspect this other bug is related:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63217

Because of the multiple conversions that work, it seems the compiler fails to
make the conversion of const references to value when given the option to
convert through the non-const conversion operator template.  I can not
reproduce the bug without the conversions being templates.

Template user conversion operators are unique in the language with respect to
their capabilities.

Thanks.

[Bug c++/63217] template conversion operator returning const reference not used for conversion in some cases

2017-01-09 Thread vz at quantitativesystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63217

--- Comment #3 from Edward  ---
Perhaps https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79035 is related

[Bug c++/79033] asan.c not compiling with make BOOT_CFLAGS='-O0' (or '-O1')

2017-01-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79033

--- Comment #2 from Martin Sebor  ---
Author: msebor
Date: Mon Jan  9 20:08:49 2017
New Revision: 244237

URL: https://gcc.gnu.org/viewcvs?rev=244237&root=gcc&view=rev
Log:
PR bootstrap/79033 - asan.c not compiling with make BOOT_CFLAGS=-O0

gcc/ChangeLog:
* asan.c (asan_emit_stack_protection): Increase local buffer size
to avoid snprintf truncation warning.

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

[Bug tree-optimization/78899] [7 Regression] Vestorized loop with optmized mask stores motion is completely deleted after r242520.

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78899

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Mon Jan  9 20:10:23 2017
New Revision: 244238

URL: https://gcc.gnu.org/viewcvs?rev=244238&root=gcc&view=rev
Log:
PR tree-optimization/78899
* tree-if-conv.c (version_loop_for_if_conversion): Instead of
returning bool return struct loop *, NULL for failure and the new
loop on success.
(versionable_outer_loop_p): Don't version outer loop if it has
dont_vectorized bit set.
(tree_if_conversion): When versioning outer loop, ensure
tree_if_conversion is performed also on the inner loop of the
non-vectorizable outer loop copy.
* tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
LOOP_VECTORIZED in inner loop of the scalar outer loop and
prevent vectorization of it.
(vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
the outer loop vectorization of the non-scalar version is attempted
before vectorization of the inner loop in scalar version.  If
outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
vectorization of its inner loop.
* tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
has 2 inner loops, rename also on edges from bb whose single pred
is outer_loop->header.  Fix typo in function comment.

* gcc.target/i386/pr78899.c: New test.
* gcc.dg/pr71077.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr71077.c
trunk/gcc/testsuite/gcc.target/i386/pr78899.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-if-conv.c
trunk/gcc/tree-vect-loop-manip.c
trunk/gcc/tree-vectorizer.c

[Bug bootstrap/79033] asan.c not compiling with make BOOT_CFLAGS='-O0' (or '-O1')

2017-01-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79033

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Component|c++ |bootstrap
 Resolution|--- |FIXED

--- Comment #3 from Martin Sebor  ---
Trivial fix committed in r244237.

[Bug tree-optimization/79036] New: [7 regression] gcc.dg/tree-ssa/builtin-sprintf.c fails starting with r244037

2017-01-09 Thread seurer at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79036

Bug ID: 79036
   Summary: [7 regression] gcc.dg/tree-ssa/builtin-sprintf.c fails
starting with r244037
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: seurer at linux dot vnet.ibm.com
  Target Milestone: ---

This fails on powerpc both BE and LE.  It also fails on x86 though the failure
is different.

Executing on host: /home/seurer/gcc/build/gcc-test2/gcc/xgcc
-B/home/seurer/gcc/build/gcc-test2/gcc/
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c 
-fno-diagnostics-show-caret -fdiagnostics-color=never   -ansi -pedantic-errors
-O2 -Wall -Wno-pedantic -fprintf-return-value  -lm-o ./builtin-sprintf.exe 
  (timeout = 300)
spawn /home/seurer/gcc/build/gcc-test2/gcc/xgcc
-B/home/seurer/gcc/build/gcc-test2/gcc/
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -ansi -pedantic-errors
-O2 -Wall -Wno-pedantic -fprintf-return-value -lm -o ./builtin-sprintf.exe
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c: In
function 'test_d_i':
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:307:20:
warning: '0' flag ignored with precision and '%i' gnu_printf format [-Wformat=]
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:128:44:
note: in definition of macro 'RNG'
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c: In
function 'test_g_long_double':
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:659:20:
warning: may write a terminating nul past the end of the destination
[-Wformat-length=]
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:128:44:
note: in definition of macro 'RNG'
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:128:11:
note: format output between 4 and 10 bytes into a destination of size 9
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:659:3:
note: in expansion of macro 'RNG'
/tmp/cc7n8Ao7.o: In function `test_g_long_double':
builtin-sprintf.c:(.text+0x5260): undefined reference to `failure_on_line_659'
collect2: error: ld returned 1 exit status
compiler exited with status 1
output is:
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c: In
function 'test_d_i':
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:307:20:
warning: '0' flag ignored with precision and '%i' gnu_printf format [-Wformat=]
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:128:44:
note: in definition of macro 'RNG'
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c: In
function 'test_g_long_double':
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:659:20:
warning: may write a terminating nul past the end of the destination
[-Wformat-length=]
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:128:44:
note: in definition of macro 'RNG'
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:128:11:
note: format output between 4 and 10 bytes into a destination of size 9
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:659:3:
note: in expansion of macro 'RNG'
/tmp/cc7n8Ao7.o: In function `test_g_long_double':
builtin-sprintf.c:(.text+0x5260): undefined reference to `failure_on_line_659'
collect2: error: ld returned 1 exit status

PASS: gcc.dg/tree-ssa/builtin-sprintf.c  (test for warnings, line 307)
FAIL: gcc.dg/tree-ssa/builtin-sprintf.c (test for excess errors)
Excess errors:
/home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c:659:20:
warning: may write a terminating nul past the end of the destination
[-Wformat-length=]
builtin-sprintf.c:(.text+0x5260): undefined reference to `failure_on_line_659'

UNRESOLVED: gcc.dg/tree-ssa/builtin-sprintf.c compilation failed to produce
executable
testcase /home/seurer/gcc/gcc-test2/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp
completed in 2 seconds

=== gcc Summary ===

# of expected passes1
# of unexpected failures1
# of unresolved testcases   1

[Bug fortran/78942] Incorrect error message for preprocessed source

2017-01-09 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78942

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Depends on||53993

--- Comment #2 from Manuel López-Ibáñez  ---
(In reply to Bálint Aradi from comment #0)
> This bug may be also related to bug 78792.

gfortran diagnostics now rely on the common diagnostics machinery to tack line
numbers and print back the source code. The common machinery works on logical
lines, which are defined by the linemarkers:
https://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html

So when you do 'gfortran test.f90', the logical location of 'program F,AIL' is
defined by the linemarker # 1 "test.F90", however, gfortran ignores the
"test.F90" (bug 53993) so it tries to open physical line 1 in test.f90, which
is the wrong location.


> Actually, the issue can be cured by changing the first line marker to
> indicate an include file, as running gfortran on the modified preprocessed
> source below gives the correct error message again:

That is wrong, because test.F90 is not an include file, and likely to cause
other problems.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53993
[Bug 53993] gfortran ignores file part of #line directives for debugging

[Bug libgomp/60670] omp.h may differ between multilibs

2017-01-09 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

--- Comment #15 from Francois-Xavier Coudert  ---
Author: fxcoudert
Date: Mon Jan  9 20:29:06 2017
New Revision: 244239

URL: https://gcc.gnu.org/viewcvs?rev=244239&root=gcc&view=rev
Log:
PR libgomp/60670
* Makefile.am: Make fincludedir multilib-aware.
* Makefile.in: Regenerate.

Modified:
trunk/libgomp/ChangeLog
trunk/libgomp/Makefile.am
trunk/libgomp/Makefile.in

[Bug libgomp/60670] omp.h may differ between multilibs

2017-01-09 Thread fxcoudert at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60670

--- Comment #16 from Francois-Xavier Coudert  ---
The Fortran part is now fixed.

[Bug sanitizer/65479] sanitizer stack trace missing frames past #0 on powerpc64

2017-01-09 Thread seurer at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65479

--- Comment #20 from seurer at gcc dot gnu.org ---
Author: seurer
Date: Mon Jan  9 20:45:59 2017
New Revision: 244241

URL: https://gcc.gnu.org/viewcvs?rev=244241&root=gcc&view=rev
Log:
2017-01-09  Bill Seurer  

Backport from mainline
2016-12-21  Bill Seurer  

PR sanitizer/65479
* config/rs6000/rs6000.c (rs6000_option_override_internal): Add
-fasynchronous-unwind-tables option when -fsanitize=address is
specified.


Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/config/rs6000/rs6000.c

[Bug rtl-optimization/79032] [7 regression] unaligned memory access generated with LRA and optimization

2017-01-09 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79032

Eric Botcazou  changed:

   What|Removed |Added

 Target|sparc   |sparc-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-09
 CC||ebotcazou at gcc dot gnu.org
   Target Milestone|--- |7.0
Summary|Unaligned memory access in  |[7 regression] unaligned
   |code generated for sparc 32 |memory access generated
   |with LRA|with LRA and optimization
 Ever confirmed|0   |1

--- Comment #1 from Eric Botcazou  ---
Confirmed, thanks for the very reduced testcase.

[Bug rtl-optimization/79032] [7 regression] unaligned memory access generated with LRA and optimization

2017-01-09 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79032

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #2 from Eric Botcazou  ---
Investigating.

[Bug rtl-optimization/79032] [7 regression] unaligned memory access generated with LRA and optimization

2017-01-09 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79032

--- Comment #3 from Eric Botcazou  ---
Created attachment 40483
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40483&action=edit
Tentative fix

To be tested on SPARC.

[Bug testsuite/79026] The tests changed by revision r244006 now fail on darwin

2017-01-09 Thread dominiq at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79026

--- Comment #4 from dominiq at gcc dot gnu.org ---
Author: dominiq
Date: Mon Jan  9 21:41:02 2017
New Revision: 244244

URL: https://gcc.gnu.org/viewcvs?rev=244244&root=gcc&view=rev
Log:
testsuite/ChangeLog:

PR testsuite/79026
* gcc.target/i386/pr78904-2.c: Require nonpic targets.
* gcc.target/i386/pr78904-4.c: Likewise.
* gcc.target/i386/pr78904-6.c: Likewise.
* gcc.target/i386/pr78967-2.c: Likewise.


Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.target/i386/pr78904-2.c
trunk/gcc/testsuite/gcc.target/i386/pr78904-4.c
trunk/gcc/testsuite/gcc.target/i386/pr78904-6.c
trunk/gcc/testsuite/gcc.target/i386/pr78967-2.c

[Bug translation/79019] translatable string typo in cif-code.def:141

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79019

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Mon Jan  9 21:48:33 2017
New Revision: 244245

URL: https://gcc.gnu.org/viewcvs?rev=244245&root=gcc&view=rev
Log:
PR translation/79019
PR translation/79020
* params.def (PARAM_INLINE_MIN_SPEEDUP,
PARAM_IPA_CP_SINGLE_CALL_PENALTY,
PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
in descriptions.
* config/avr/avr.opt (maccumulate-args): Likewise.
* config/msp430/msp430.opt (mwarn-mcu): Likewise.
* common.opt (freport-bug): Likewise.
* cif-code.def (CIF_FINAL_ERROR): Likewise.
* doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
* config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
translatable string.
* config/i386/i386.c (function_value_32): Likewise.
* config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
* config/msp430/msp430.c (msp430_option_override, msp430_attr):
Likewise.
* config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
* common/config/msp430/msp430-common.c (msp430_handle_option):
Likewise.
* symtab.c (symtab_node::verify_base): Likewise.
* opts.c (set_debug_level): Likewise.
* tree.c (verify_type_variant): Likewise.  Fix typo in comment.
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
missing whitespace to translatable strings.
* config/avr/avr.md (bswapsi2): Fix typo in comment.
* config/sh/superh.h: Likewise.
* config/i386/xopintrin.h: Likewise.
* config/i386/znver1.md: Likewise.
* config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
* ipa-inline-analysis.c (compute_inline_parameters): Likewise.
* double-int.h (struct double_int): Likewise.
* double-int.c (div_and_round_double): Likewise.
* wide-int.cc: Likewise.
* tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
* tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
* cfgcleanup.c (crossjumps_occured): Renamed to ...
(crossjumps_occurred): ... this.
(try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
Adjust all uses.
cp/
* semantics.c (finish_omp_clauses): Add missing whitespace to
translatable strings.
* cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
lto/
* lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
fortran/
* decl.c (attr_decl1): Fix spelling in translatable string.
* intrinsic.texi: Fix spelling - invokation -> invocation.
* lang.opt (faggressive-function-elimination, gfc_convert): Fix
typos in descriptions.
* openmp.c (resolve_omp_clauses): Add missing whitespace to
translatable strings.
c-family/
* c.opt (Wnormalized=): Fix typo in description.
testsuite/
* c-c++-common/goacc/host_data-2.c (f): Adjust expected spelling of
diagnostics.
* gfortran.dg/initialization_17.f90: Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c.opt
trunk/gcc/cfgcleanup.c
trunk/gcc/cif-code.def
trunk/gcc/common.opt
trunk/gcc/common/config/msp430/msp430-common.c
trunk/gcc/config/avr/avr.md
trunk/gcc/config/avr/avr.opt
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/xopintrin.h
trunk/gcc/config/i386/znver1.md
trunk/gcc/config/msp430/driver-msp430.c
trunk/gcc/config/msp430/msp430.c
trunk/gcc/config/msp430/msp430.opt
trunk/gcc/config/nios2/nios2.c
trunk/gcc/config/rs6000/rs6000-c.c
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/s390/s390.c
trunk/gcc/config/sh/superh.h
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-cilkplus.c
trunk/gcc/cp/semantics.c
trunk/gcc/doc/invoke.texi
trunk/gcc/double-int.c
trunk/gcc/double-int.h
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/intrinsic.texi
trunk/gcc/fortran/lang.opt
trunk/gcc/fortran/openmp.c
trunk/gcc/ipa-inline-analysis.c
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto-symtab.c
trunk/gcc/opts.c
trunk/gcc/params.def
trunk/gcc/symtab.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/goacc/host_data-2.c
trunk/gcc/testsuite/gfortran.dg/initialization_17.f90
trunk/gcc/tree-ssa-sccvn.c
trunk/gcc/tree-ssa.c
trunk/gcc/tree.c
trunk/gcc/wide-int.cc

[Bug testsuite/79026] The tests changed by revision r244006 now fail on darwin

2017-01-09 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79026

Dominique d'Humieres  changed:

   What|Removed |Added

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

--- Comment #5 from Dominique d'Humieres  ---
Closing.

[Bug translation/79020] translatable string typo in params.def:1173

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79020

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/67955] tree-dse does not use pointer info

2017-01-09 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67955

--- Comment #12 from Jeffrey A. Law  ---
Author: law
Date: Mon Jan  9 21:53:02 2017
New Revision: 244247

URL: https://gcc.gnu.org/viewcvs?rev=244247&root=gcc&view=rev
Log:
PR tree-optimization/79007
PR tree-optimization/67955
* tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
conservative for pt.null when flag_non_call_exceptions is on.

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

[Bug translation/79020] translatable string typo in params.def:1173

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79020

--- Comment #2 from Jakub Jelinek  ---
Author: jakub
Date: Mon Jan  9 21:48:33 2017
New Revision: 244245

URL: https://gcc.gnu.org/viewcvs?rev=244245&root=gcc&view=rev
Log:
PR translation/79019
PR translation/79020
* params.def (PARAM_INLINE_MIN_SPEEDUP,
PARAM_IPA_CP_SINGLE_CALL_PENALTY,
PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
in descriptions.
* config/avr/avr.opt (maccumulate-args): Likewise.
* config/msp430/msp430.opt (mwarn-mcu): Likewise.
* common.opt (freport-bug): Likewise.
* cif-code.def (CIF_FINAL_ERROR): Likewise.
* doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
* config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
translatable string.
* config/i386/i386.c (function_value_32): Likewise.
* config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
* config/msp430/msp430.c (msp430_option_override, msp430_attr):
Likewise.
* config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
* common/config/msp430/msp430-common.c (msp430_handle_option):
Likewise.
* symtab.c (symtab_node::verify_base): Likewise.
* opts.c (set_debug_level): Likewise.
* tree.c (verify_type_variant): Likewise.  Fix typo in comment.
* config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
missing whitespace to translatable strings.
* config/avr/avr.md (bswapsi2): Fix typo in comment.
* config/sh/superh.h: Likewise.
* config/i386/xopintrin.h: Likewise.
* config/i386/znver1.md: Likewise.
* config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
* ipa-inline-analysis.c (compute_inline_parameters): Likewise.
* double-int.h (struct double_int): Likewise.
* double-int.c (div_and_round_double): Likewise.
* wide-int.cc: Likewise.
* tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
* tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
* cfgcleanup.c (crossjumps_occured): Renamed to ...
(crossjumps_occurred): ... this.
(try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
Adjust all uses.
cp/
* semantics.c (finish_omp_clauses): Add missing whitespace to
translatable strings.
* cp-cilkplus.c (cpp_validate_cilk_plus_loop_aux): Fix comment typo.
lto/
* lto-symtab.c (lto_symtab_merge_symbols): Fix comment typo.
fortran/
* decl.c (attr_decl1): Fix spelling in translatable string.
* intrinsic.texi: Fix spelling - invokation -> invocation.
* lang.opt (faggressive-function-elimination, gfc_convert): Fix
typos in descriptions.
* openmp.c (resolve_omp_clauses): Add missing whitespace to
translatable strings.
c-family/
* c.opt (Wnormalized=): Fix typo in description.
testsuite/
* c-c++-common/goacc/host_data-2.c (f): Adjust expected spelling of
diagnostics.
* gfortran.dg/initialization_17.f90: Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c.opt
trunk/gcc/cfgcleanup.c
trunk/gcc/cif-code.def
trunk/gcc/common.opt
trunk/gcc/common/config/msp430/msp430-common.c
trunk/gcc/config/avr/avr.md
trunk/gcc/config/avr/avr.opt
trunk/gcc/config/i386/i386.c
trunk/gcc/config/i386/xopintrin.h
trunk/gcc/config/i386/znver1.md
trunk/gcc/config/msp430/driver-msp430.c
trunk/gcc/config/msp430/msp430.c
trunk/gcc/config/msp430/msp430.opt
trunk/gcc/config/nios2/nios2.c
trunk/gcc/config/rs6000/rs6000-c.c
trunk/gcc/config/rs6000/rs6000.c
trunk/gcc/config/s390/s390.c
trunk/gcc/config/sh/superh.h
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-cilkplus.c
trunk/gcc/cp/semantics.c
trunk/gcc/doc/invoke.texi
trunk/gcc/double-int.c
trunk/gcc/double-int.h
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/decl.c
trunk/gcc/fortran/intrinsic.texi
trunk/gcc/fortran/lang.opt
trunk/gcc/fortran/openmp.c
trunk/gcc/ipa-inline-analysis.c
trunk/gcc/lto/ChangeLog
trunk/gcc/lto/lto-symtab.c
trunk/gcc/opts.c
trunk/gcc/params.def
trunk/gcc/symtab.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/goacc/host_data-2.c
trunk/gcc/testsuite/gfortran.dg/initialization_17.f90
trunk/gcc/tree-ssa-sccvn.c
trunk/gcc/tree-ssa.c
trunk/gcc/tree.c
trunk/gcc/wide-int.cc

[Bug tree-optimization/79007] gcc.dg/tree-ssa/dse-points-to.c fails starting with r244067

2017-01-09 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79007

Jeffrey A. Law  changed:

   What|Removed |Added

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

--- Comment #8 from Jeffrey A. Law  ---
Fixed on the trunk.

[Bug tree-optimization/79007] gcc.dg/tree-ssa/dse-points-to.c fails starting with r244067

2017-01-09 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79007

--- Comment #7 from Jeffrey A. Law  ---
Author: law
Date: Mon Jan  9 21:53:02 2017
New Revision: 244247

URL: https://gcc.gnu.org/viewcvs?rev=244247&root=gcc&view=rev
Log:
PR tree-optimization/79007
PR tree-optimization/67955
* tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
conservative for pt.null when flag_non_call_exceptions is on.

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

[Bug target/71017] libgcc/config/i386/cpuinfo.c:346:17: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'

2017-01-09 Thread dominiq at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71017

--- Comment #2 from dominiq at gcc dot gnu.org ---
Author: dominiq
Date: Mon Jan  9 22:00:32 2017
New Revision: 244248

URL: https://gcc.gnu.org/viewcvs?rev=244248&root=gcc&view=rev
Log:
PR target/71017
* config/i386/cpuid.h: Fix undefined behavior.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/cpuid.h

[Bug go/79037] New: gccgo: Binaries crash with parforsetup: pos is not aligned on m68k

2017-01-09 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79037

Bug ID: 79037
   Summary: gccgo: Binaries crash with parforsetup: pos is not
aligned on m68k
   Product: gcc
   Version: 6.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: go
  Assignee: ian at airs dot com
  Reporter: glaubitz at physik dot fu-berlin.de
CC: cmang at google dot com,
gcc-bugzilla at mkarcher dot dialup.fu-berlin.de,
schwab at gcc dot gnu.org
  Target Milestone: ---
Target: m68k-*-*

Hi!

I have just built gccgo on linux-m68k for the first time (Debian unstable) and
tried to build and run a simple "Hello World" program.

Unfortunately, the compiled binary crashes with what looks like to be an
alignment issue:

(sid-m68k-sbuild)root@jessie64:~# cat hello-world.go 
package main

import "fmt"

func main() {
fmt.Println("Hello World!")
}
(sid-m68k-sbuild)root@jessie64:~# gccgo-6 hello-world.go -o hello-world
(sid-m68k-sbuild)root@jessie64:~# ./hello-world 
fatal error: parforsetup: pos is not aligned

runtime stack:
runtime_dopanic
../../../src/libgo/runtime/panic.c:135
runtime_throw
../../../src/libgo/runtime/panic.c:193
runtime_parforsetup
../../../src/libgo/runtime/parfor.c:63
gc
../../../src/libgo/runtime/mgc0.c:2259
mgc
../../../src/libgo/runtime/mgc0.c:2215
runtime_mstart
../../../src/libgo/runtime/proc.c:1076

goroutine 16 [garbage collection]:
runtime_mcall
../../../src/libgo/runtime/proc.c:295
runtime_gc
../../../src/libgo/runtime/mgc0.c:2191
runtime_mallocgc
../../../src/libgo/runtime/malloc.goc:259
__go_new
../../../src/libgo/runtime/go-new.c:16
main.main
/root/hello-world.go:6
runtime_main
../../../src/libgo/runtime/proc.c:626

goroutine 17 [runnable]:
kickoff
../../../src/libgo/runtime/proc.c:232
created by runtime_main
../../../src/libgo/runtime/proc.c:598

goroutine 18 [runnable]:
kickoff
../../../src/libgo/runtime/proc.c:232
created by runtime_createfing
../../../src/libgo/runtime/mgc0.c:2577
(sid-m68k-sbuild)root@jessie64:~#

Could this be possibly caused by the fact that the default alignment on m68k is
16 bits despite being a 32-bits architcture?

In any case, let me know if you need more debug information.

Thanks,
Adrian

[Bug translation/79019] translatable string typo in cif-code.def:141

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79019

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/78899] [7 Regression] Vestorized loop with optmized mask stores motion is completely deleted after r242520.

2017-01-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78899

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug go/79037] gccgo: Binaries crash with parforsetup: pos is not aligned on m68k

2017-01-09 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79037

--- Comment #1 from John Paul Adrian Glaubitz  ---
Rebuilding gcc with the following change now:

--- a/src/libgo/runtime/runtime.h.old   2016-02-12 23:10:09.0 +0100
+++ b/src/libgo/runtime/runtime.h   2017-01-10 00:12:08.404802087 +0100
@@ -429,7 +429,7 @@
uint32 cnt; // iteration space [0, cnt)
bool wait;  // if true, wait while all threads
finish processing,
// otherwise parfor may return while
other threads are still working
-   ParForThread *thr;  // array of thread descriptors
+   ParForThread *thr __attribute__((aligned(4))); // array of thread
descriptors
// stats
uint64 nsteal;
uint64 nstealcnt;

I'll report back tomorrow.

[Bug testsuite/79036] [7 regression] gcc.dg/tree-ssa/builtin-sprintf.c fails starting with r244037

2017-01-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79036

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-09
  Component|tree-optimization   |testsuite
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Sebor  ---
I can confirm the test failure on powerpc64 but not on x86_64.

The failure is in a test case that tries to verify that formatting the long
double value 0.1L results in between 3 to 8 bytes.

The gcc-ssa-sprintf pass determines the range of bytes by formatting GCC's
representation of 0.1L by calling the mpfr_snprintf function twice, one with
rounding down and again with rounding up, and using the results as the bounds
for the range.

Due to the difference in precision between different targets, GCC's internal
representation of 0.1L is 1.00...1e-1 on x86_64 but 9.99...6e-2 on
powerpc64, which formats as "0.1" and "0.11" on x86_64 (rounded down or up,
respectively), but as "0.099" and "0.1" on powerpc64 (again, rounded down
or up, respectively).  This is also how Glibc formats the values.

So the bug is in the test suite assuming the x86_64 format with lower precision
and not being prepared to handle the powerpc64 format with greater precision.  
 (I'm also not sure if it qualifies as a regression but since I have a simple
testsuite-only fix that's probably not important.)

[Bug c++/79024] alignas / alignof report wrong alignment for 64bit integer types for 32bit target

2017-01-09 Thread gnu-9fbaow at upsuper dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79024

--- Comment #7 from Xidorn Quan  ---
(In reply to Jonathan Wakely from comment #5)
> Please read 3.11 more carefully.
> 
> "The alignment required for a type might be different when it is used as the
> type of a complete object and when it is used as the type of a subobject.
> [...] The result of the alignof operator reflects the alignment requirement
> of the type in the complete-object case."

I saw that, but given the example, I thought it was only for the case of
virtual base... Well...

[Bug testsuite/79036] [7 regression] gcc.dg/tree-ssa/builtin-sprintf.c fails starting with r244037

2017-01-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79036

--- Comment #2 from Martin Sebor  ---
Author: msebor
Date: Mon Jan  9 23:31:38 2017
New Revision: 244250

URL: https://gcc.gnu.org/viewcvs?rev=244250&root=gcc&view=rev
Log:
PR testsuite/79036 - gcc.dg/tree-ssa/builtin-sprintf.c fails starting with
r244037
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/builtin-sprintf.c: Handle extended formats
with different precisions.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf.c

[Bug testsuite/79036] [7 regression] gcc.dg/tree-ssa/builtin-sprintf.c fails starting with r244037

2017-01-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79036

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #3 from Martin Sebor  ---
Test adjusted in r244250.  Verified on powerpc64 and x86_64.

[Bug target/79038] New: Improve PowerPC ISA 3.0 conversion between integers and hardware _Float128

2017-01-09 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79038

Bug ID: 79038
   Summary: Improve PowerPC ISA 3.0 conversion between integers
and hardware _Float128
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: meissner at gcc dot gnu.org
  Target Milestone: ---

The code for doing ISA 3.0 conversions between integer types and _Float128 was
written before 64-bit integer types were allowed in Altivec registers, and
before 32/16/8-bit integer types were allowed in any VSX register.

In fixing PR target/79004, I was reminded that the code needed improving
someday when integers were allowed natively in the Altivec registers.  We need
to port similar changes for SFmode/DFmode to KFmode/TFmode.  Because this was
an enhancement that was not noticed until late in stage3, it was decided to
delay the work until GCC 8.x.

[Bug target/79038] Improve PowerPC ISA 3.0 conversion between integers and hardware _Float128

2017-01-09 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79038

Michael Meissner  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-01-10
 CC||acsawdey at linux dot 
vnet.ibm.com
   ||, dje at gcc dot gnu.org,
   ||segher at gcc dot gnu.org,
   ||wschmidt at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |meissner at gcc dot 
gnu.org
 Ever confirmed|0   |1

[Bug target/79004] ICE in gcc.dg/torture/fp-int-convert-float128-ieee.c with -mcpu=power9

2017-01-09 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79004

--- Comment #5 from Michael Meissner  ---
Created attachment 40484
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40484&action=edit
Proposed patch to fix the problem

It was decided to split PR target/79004 into 2 parts.  This patch fixes the
problem by disabling the optimization of loading char/short variables from
memory and converting them to IEEE 128-bit floating point in the vector
registers.  This patch will have the effect that the value is first loaded into
a GPR, sign/zero extended, and then moved over to an Altivec register to do the
conversion.

PR target/79038 is an enhancement request to rework the integer<->IEEE 128-bit
floating conversions to match the current float/double conversions with regard
to small integers.

[Bug target/79039] New: builtins-3-p9.c fails with -m32

2017-01-09 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79039

Bug ID: 79039
   Summary: builtins-3-p9.c fails with -m32
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: segher at gcc dot gnu.org
  Target Milestone: ---

The testcase fails with -m32, as reported by Andreas in
https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00017.html .
This is because long is just 32 bits with -m32, so generates the same code as
int.

[Bug target/79039] builtins-3-p9.c fails with -m32

2017-01-09 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79039

Segher Boessenkool  changed:

   What|Removed |Added

 Target||powerpc*-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-10
 Ever confirmed|0   |1

[Bug target/79040] New: vec_cntlz redefined

2017-01-09 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79040

Bug ID: 79040
   Summary: vec_cntlz redefined
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: segher at gcc dot gnu.org
  Target Milestone: ---

/home/segher/build/tot-master/gcc/include/altivec.h:392:0: warning: "vec_cntlz"
redefined
 #define vec_cntlz __builtin_vec_vctz

/home/segher/build/tot-master/gcc/include/altivec.h:352:0: note: this is the
location of the previous definition
 #define vec_cntlz __builtin_vec_vclz

[Bug target/79040] vec_cntlz redefined

2017-01-09 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79040

Segher Boessenkool  changed:

   What|Removed |Added

 Target||powerpc*-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-10
 Ever confirmed|0   |1

[Bug target/70668] nds32-elf toolchain fails to compile on OSX

2017-01-09 Thread jasonwucj at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70668

--- Comment #10 from Chung-Ju Wu  ---
Author: jasonwucj
Date: Tue Jan 10 04:18:11 2017
New Revision: 244257

URL: https://gcc.gnu.org/viewcvs?rev=244257&root=gcc&view=rev
Log:
Fix PR70668.

Backport from mainline
2016-04-28  Segher Boessenkool  

PR target/70668
* config/nds32/nds32.md (casesi): Don't access the operands array
out of bounds.

Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/config/nds32/nds32.md

[Bug target/70668] nds32-elf toolchain fails to compile on OSX

2017-01-09 Thread jasonwucj at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70668

--- Comment #11 from Chung-Ju Wu  ---
Author: jasonwucj
Date: Tue Jan 10 04:23:35 2017
New Revision: 244258

URL: https://gcc.gnu.org/viewcvs?rev=244258&root=gcc&view=rev
Log:
Fix PR70668.

Backport from mainline
2016-04-28  Segher Boessenkool  

PR target/70668
* config/nds32/nds32.md (casesi): Don't access the operands array
out of bounds.

Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/nds32/nds32.md

[Bug target/70668] nds32-elf toolchain fails to compile on OSX

2017-01-09 Thread jasonwucj at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70668

Chung-Ju Wu  changed:

   What|Removed |Added

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

--- Comment #12 from Chung-Ju Wu  ---
(In reply to Segher Boessenkool from comment #7)
> Fixed on trunk, backports pending.

Eventually I decided to backport it to gcc-5 and gcc-6 branches.
Thanks all the comments above. :)

Set status as RESOLVED-FIXED.

[Bug tree-optimization/71357] [7 Regression] [graphite] ICE: verify_ssa failed (error: definition in block follows the use for SSA_NAME) w/ -O2 -floop-nest-optimize

2017-01-09 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71357

--- Comment #3 from Arseny Solokha  ---
I cannot reproduce it anymore w/ gcc-7.0.0-alpha20170108 snapshot and isl 0.18.

[Bug target/77346] [7 Regression] ICE in push_reload, at reload.c:1350

2017-01-09 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77346

--- Comment #10 from Arseny Solokha  ---
W/ gcc-7.0.0-alpha20170108 I too cannot reproduce it anymore.

  1   2   >