[Bug bootstrap/66978] New: [6 Regression] bootstrap failure with --with-multilib-list=m32,m64,mx32

2015-07-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66978

Bug ID: 66978
   Summary: [6 Regression] bootstrap failure with
--with-multilib-list=m32,m64,mx32
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

On Linux/x86-64, r226113 failed to bootstrap with
--with-multilib-list=m32,m64,mx32:

/../../../src-trunk/libquadmath/printf/printf_fp.c: In function ‘hack_digit’:
../../../../src-trunk/libquadmath/printf/printf_fp.c:191:11: internal compiler
error: in emit_move_insn, at expr.c:3552
   wchar_t hack_digit (void)
   ^
0x7f789b emit_move_insn(rtx_def*, rtx_def*)
../../src-trunk/gcc/expr.c:3551
0x8566a1 expand_function_start(tree_node*)
../../src-trunk/gcc/function.c:5210
0x6fc47e execute
../../src-trunk/gcc/cfgexpand.c:6105
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See http://gcc.gnu.org/bugs.html for instructions.
Makefile:1035: recipe for target 'printf/printf_fp.lo' failed
make[9]: *** [printf/printf_fp.lo] Error 1

[Bug c++/66758] [concepts] ICE compiler deeply confused by simple-seeming concept definition

2015-07-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66758

--- Comment #13 from Jason Merrill jason at gcc dot gnu.org ---
Author: jason
Date: Thu Jul 23 23:14:32 2015
New Revision: 226129

URL: https://gcc.gnu.org/viewcvs?rev=226129root=gccview=rev
Log:
PR c++/66758
* cxx-pretty-print.c (pp_cxx_parameterized_constraint): Constraint
vars aren't a TREE_LIST anymore.

Modified:
branches/c++-concepts/ChangeLog.concepts
branches/c++-concepts/gcc/cp/cxx-pretty-print.c


[Bug debug/66653] [6 Regression] ice in gen_type_die_with_usage, at dwarf2out.c:20876

2015-07-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66653

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org

--- Comment #7 from Jason Merrill jason at gcc dot gnu.org ---
Fixed.


[Bug fortran/66979] New: gfortran internal compiler error with malformed FLUSH statement

2015-07-23 Thread maddenp at colorado dot edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66979

Bug ID: 66979
   Summary: gfortran internal compiler error with malformed FLUSH
statement
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: maddenp at colorado dot edu
  Target Milestone: ---

This program has a syntax error (no unit specified) in the flush statement:

% cat p.f90 
program p
  implicit none
  integer::i
  flush (iostat=i)
end program p

% gfortran p.f90 
f951: internal compiler error: Segmentation fault
[...]

% gfortran --version
GNU Fortran (Ubuntu 4.9.2-10ubuntu13) 4.9.2
[...]

Also, using the nightly snapshot I just downloaded (is this too new to be
useful?):

% ~/Desktop/gcc-trunk/bin/gfortran p.f90 
f951: internal compiler error: Segmentation fault
0x5a78e0 ???
../sysdeps/x86_64/elf/start.S:113
[...]

% ~/Desktop/gcc-trunk/bin/gfortran --version
GNU Fortran (GCC) 6.0.0 20150723 (experimental) [trunk revision 226084]
[...]

My system:

% uname -a
Linux o 3.19.0-22-generic #22-Ubuntu SMP Tue Jun 16 17:15:15 UTC 2015 x86_64
x86_64 x86_64 GNU/Linux

I hope this is useful.


[Bug c++/66962] [concepts] overloaded function causing memory blow-up and ICE

2015-07-23 Thread eric.niebler at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962

--- Comment #3 from Eric Niebler eric.niebler at gmail dot com ---
I can't make sense of that error, or understand why you get that and I don't.
You tried the command line I gave above, with the latest concept-gcc built from
source?


[Bug c++/66962] [concepts] overloaded function causing memory blow-up and ICE

2015-07-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-23
 Ever confirmed|0   |1

--- Comment #8 from Jason Merrill jason at gcc dot gnu.org ---
(In reply to Casey Carter from comment #5)
 (In reply to Markus Trippelsdorf from comment #2)
  /usr/local/gcc-concepts/include/c++/6.0.0/initializer_list:47:11: fatal
  error: definition of std::initializer_list does not match #include
  initializer_list
 
 This is because the definition of std::initializer_list in the preprocessed
 source doesn't agree with your compiler's - or mine - notion of what
 std::initializer_list should be.

The issue is just 32-bit vs 64-bit size_t.  I'm able to reproduce the bug with
the original testcase using the -m32 flag.

The testcase in comment #7 has different requirements on iter_swap2, so it
doesn't run into this bug.  It was crashing because my recent patch needed an
additional NULL check, which I have now added.

The problem in Eric's testcases seems to be that decompose_assumptions is
consuming an extreme amount of memory, I think because left_disjunction causes
the process to have quadratic complexity.  So I think we need an algorithmic
change here.  Andrew?


[Bug c++/66962] [concepts] overloaded function causing memory blow-up and ICE

2015-07-23 Thread eric.niebler at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962

--- Comment #9 from Eric Niebler eric.niebler at gmail dot com ---
Jason, is there anything I can do in my code to avoid the quadratic explosion
while we wait for Andrew to fix the bug?


[Bug c++/66962] [concepts] overloaded function causing memory blow-up and ICE

2015-07-23 Thread eric.niebler at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962

Eric Niebler eric.niebler at gmail dot com changed:

   What|Removed |Added

  Attachment #36028|0   |1
is obsolete||

--- Comment #6 from Eric Niebler eric.niebler at gmail dot com ---
Created attachment 36043
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36043action=edit
regenerate the test case

Regenerate the test case. Hopefully this is better.


[Bug bootstrap/66978] [6 Regression] bootstrap failure with --with-multilib-list=m32,m64,mx32

2015-07-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66978

--- Comment #1 from H.J. Lu hjl.tools at gmail dot com ---
Created attachment 36042
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36042action=edit
A testcase

(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /export/build/gnu/gcc/build-x86_64-linux/gcc/cc1
-fpreprocessed x.i -quiet -dumpbase x.i -mx32 -mtune=generic -march=x86-64
-auxbase-strip x.s -O2 -version -o x.s
GNU C11 (GCC) version 6.0.0 20150723 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.2.1 20150716 (Red Hat 5.2.1-1), GMP version
6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C11 (GCC) version 6.0.0 20150723 (experimental) (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.2.1 20150716 (Red Hat 5.2.1-1), GMP version
6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 79713220058827192abd81c1ee93d8e2

Breakpoint 1, fancy_abort (
file=0x18c3238 /export/gnu/import/git/sources/gcc/gcc/expr.c, line=3552, 
function=0x18c49a8 emit_move_insn(rtx_def*, rtx_def*)::__FUNCTION__
emit_move_insn) at /export/gnu/import/git/sources/gcc/gcc/diagnostic.c:1340
1340  internal_error (in %s, at %s:%d, function, trim_filename (file),
line);
(gdb) f 2
#2  0x00a55587 in expand_function_start (
subr=function_decl 0x713dcd20 hack_digit)
at /export/gnu/import/git/sources/gcc/gcc/function.c:5210
5210  insn = emit_move_insn (local, chain);
(gdb) call debug_rtx (chain)
(reg:SI 39 r10 [ CHAIN.8 ])
(gdb) call debug_rtx (local)
(reg/f:DI 87 [ CHAIN.8 ])
(gdb)


[Bug bootstrap/66978] [6 Regression] bootstrap failure with --with-multilib-list=m32,m64,mx32

2015-07-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66978

H.J. Lu hjl.tools at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-23
   Target Milestone|--- |6.0
 Ever confirmed|0   |1


[Bug tree-optimization/66981] [graphite] delinearization of arrays

2015-07-23 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66981

--- Comment #1 from Dominique d'Humieres dominiq at lps dot ens.fr ---
Is this related to PR61000?


[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

2015-07-23 Thread noloader at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #25 from Jeffrey Walton noloader at gmail dot com ---
Jonathan, Manuel, et al -

I'm putting this to bed on our side. We've re-enabled -Wall, and are moving
towards -Wextra.

I did come up with one more use case... The unused parameter warning.
Typically, I just comment it out:

   int Foo(int /*bar*/);

However, when generating documentation from sources, that's not a good
strategy. I now see the program omits the parameter altogether from the markup.

In the case of Crypto++, which has a lot of interface programming aspects, it
makes for a noisy compile as objects are composed and derived. There's often no
way to avoid something being unused along the inheritance chain.


[Bug c++/66962] [concepts] overloaded function causing memory blow-up and ICE

2015-07-23 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962

--- Comment #4 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
(In reply to Eric Niebler from comment #3)
 I can't make sense of that error, or understand why you get that and I
 don't. You tried the command line I gave above, with the latest concept-gcc
 built from source?

Yes. But it looks like you use i686-pc-cygwin and I'm running Linux.


[Bug tree-optimization/66980] New: [graphite] -floop-nest-optimize produces wrong code

2015-07-23 Thread spop at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66980

Bug ID: 66980
   Summary: [graphite] -floop-nest-optimize produces wrong code
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: spop at gcc dot gnu.org
  Target Milestone: ---

$ cat s.c
void foo(unsigned char *in, unsigned char *out, int w, int h)
{
  unsigned int i, j;
  for (i = 0; i  3*w*h; i++)
for (j = 0; j  3*w*h; j++)
  out[i * w + j] = in[(i * w + j)*3] + in[(i * w + j)*3 + 1] + in[(i * w +
j)*3 + 2];
}

$ gcc -O3 -floop-nest-optimize -S s.c -o -
[...]
foo:
ret
[...]


[Bug tree-optimization/66981] New: [graphite] delinearization of arrays

2015-07-23 Thread spop at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66981

Bug ID: 66981
   Summary: [graphite] delinearization of arrays
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: spop at gcc dot gnu.org
  Reporter: spop at gcc dot gnu.org
CC: hiraditya at msn dot com
  Target Milestone: ---

Graphite needs to delinearize the memory accesses in this loop to do
vectorization and parallelization:

$ cat s.c
void foo(unsigned char *in, unsigned char *out, int w, int h)
{
  unsigned int i, j;
  for (i = 0; i  3*w*h; i++)
for (j = 0; j  3*w*h; j++)
  out[i*w+j] = in[(i*w+j)*3] + in[(i*w+j)*3+1] + in[(i*w+j)*3+2];
}

$ gcc -O3 -floop-parallelize-all s.c

Polly vectorizes this loop with vector factor 16.


[Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2

2015-07-23 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930

--- Comment #12 from Kazumoto Kojima kkojima at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #10)
 Index: gcc/config/sh/sh.c
 ===
 --- gcc/config/sh/sh.c(revision 225987)
 +++ gcc/config/sh/sh.c(working copy)
 @@ -13888,6 +13888,7 @@
 !sh_insn_operands_modified_between_p (t_before_negc.insn,
  t_before_negc.insn,
  t_after_negc.insn)
 +   !modified_between_p (get_t_reg_rtx (), curr_insn,
 t_after_negc.insn)
 !sh_unspec_insn_p (t_after_negc.insn)
 !volatile_insn_p (PATTERN (t_after_negc.insn))
 !side_effects_p (PATTERN (t_after_negc.insn))
 
 I've added this code as part of PR 63986.  I've checked with make -k
 check-gcc RUNTESTFLAGS=sh.exp
 --target_board=sh-sim\{-m2a/-mb,-m4/-ml,-m4/-mb} that there are no new SH
 specific fails, so I assume the patch above should be OK (although all the
 checks should probably be combined to avoid walking the insns repeatedly). 
 Could you please add it to your test run?

The toplevel make -k check on sh4-unknown-linux-gnu is running.
I'll report back when it completes.

BTW, during debugging the issue, I thought that this call-clobbered case
is excluded with sh_find_set_of_reg and found again that NONJUMP_INSN_P
is simply defined as (GET_CODE (X) == INSN).  Each time I've found it,
I've recalled that it isn't (GET_CODE (X) != JUMP_INSN), then the next
time...  Anyway I've tried another one liner

--- a/config/sh/sh-protos.h
+++ b/config/sh/sh-protos.h
@@ -198,7 +198,7 @@ sh_find_set_of_reg (rtx reg, rtx_insn* insn, F stepfunc,
 {
   if (BARRIER_P (result.insn))
break;
-  if (!NONJUMP_INSN_P (result.insn))
+  if (!NONJUMP_INSN_P (result.insn)  !CALL_P (result.insn))
continue;
   if (reg_set_p (reg, result.insn))
{

and it works like as my expectation, though I'm not sure whether it's
a right thing or not.

[Bug c++/66982] New: Internal compiler error: Segmentation fault in C++14 code (followup of #65973)

2015-07-23 Thread philipp.classen at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66982

Bug ID: 66982
   Summary: Internal compiler error: Segmentation fault in C++14
code (followup of #65973)
   Product: gcc
   Version: 5.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: philipp.classen at gmx dot net
  Target Milestone: ---

Created attachment 36045
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36045action=edit
gzipped output of -freport-bug

Bug #65973 solved one C++14 internal compiler error. That is good news, but my
program still crashes when compiling it with gcc 5.2.0:

g++ -freport-bug -DHAVE_CONFIG_H -I.  -Wall -Wfatal-errors -Wextra
-Wno-type-limits -Wstrict-aliasing -Wvla -Wdisabled-optimization
-Wdouble-promotion  -pipe  --std=c++14 -D
EXTENDED_PARALLEL_LOGGING__DEPENDS_ON_TARGET__  -DUSE_TABLEBASES
-DUSE_NALIMOV_TABLEBASES-DUSE_BITBASES -DUSE_SINGLE_PAWN_BITBASES
-DUSE_TWO_PAWNS_BITBASES -DUSE_RAMMED_PAWNS_BITBASES -g3
-DAVOID_EXPENSIVE_DEBUG_OPTIONS   -I gmock-bundle/include -I
gmock-bundle/gtest/include -g  -MT fastdebug-bitbases.o -MD -MP -MF
.deps/fastdebug-bitbases.Tpo -c -o fastdebug-bitbases.o `test -f 'bitbases.cpp'
|| echo './'`bitbases.cpp

In file included from bitbases.cpp:6:0:
constants.h:247:10:   in constexpr expansion of ‘SQ_MASK(0)’
constants.h:248:55: internal compiler error: Segmentation fault
   SQ_MASK(A5) | SQ_MASK(A6) | SQ_MASK(A7) | SQ_MASK(A8);

Please submit a full bug report,
with preprocessed source if appropriate.
See https://bugs.archlinux.org/ for instructions.
Preprocessed source stored into /tmp/ccpYk9IH.out file, please attach this to
your bugreport.

[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

2015-07-23 Thread noloader at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #20 from Jeffrey Walton noloader at gmail dot com ---
(In reply to Manuel López-Ibáñez from comment #19)
 For what is worth, anyone please feel free to take my WIP patch in comment
 #10 and get it finished. You may also claim for yourself any bounty or
 compensation that may derive from it.

Or, let me know where you would like a donation made (I've found the FOSS folks
often don't due it for money).

[Bug tree-optimization/66952] [6 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu

2015-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66952

--- Comment #7 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Thu Jul 23 11:19:26 2015
New Revision: 226104

URL: https://gcc.gnu.org/viewcvs?rev=226104root=gccview=rev
Log:
2015-07-23  Richard Biener  rguent...@suse.de

PR tree-optimization/66952
* gcc.dg/torture/pr66952.c: Use signed char.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/torture/pr66952.c


[Bug libstdc++/66145] [5/6 Regression] std::ios_base::failure objects thrown from libstdc++.so use old ABI

2015-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||wrong-code
   Priority|P3  |P2
   Target Milestone|--- |5.3



[Bug tree-optimization/66926] [6 regression] FAIL: gfortran.dg/graphite/vect-pr40979.f90 -O (internal compiler error)

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66926

--- Comment #5 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Author: ienkovich
Date: Thu Jul 23 11:13:00 2015
New Revision: 226103

URL: https://gcc.gnu.org/viewcvs?rev=226103root=gccview=rev
Log:
gcc/

PR tree-optimization/66926,66951
* tree-vect-loop-manip.c (slpeel_tree_peel_loop_to_edge): Delete
INNER_LOOP and fix up condition for renaming virtual operands.

gcc/testsuite/

PR tree-optimization/66926,66951
* gcc.dg/vect/pr66951.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/vect/pr66951.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-loop-manip.c


[Bug other/65530] [meta-bug] -mmpx -fcheck-pointer-bounds failures

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65530
Bug 65530 depends on bug 66568, which changed state.

Bug 66568 Summary: [CHKP] internal compiler error: in expand_expr_addr_expr_1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66568

   What|Removed |Added

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


[Bug other/65530] [meta-bug] -mmpx -fcheck-pointer-bounds failures

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65530
Bug 65530 depends on bug 66569, which changed state.

Bug 66569 Summary: [CHKP] internal compiler error: in assign_by_spills
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66569

   What|Removed |Added

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


[Bug target/66569] [CHKP] internal compiler error: in assign_by_spills

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66569

Ilya Enkovich ienkovich at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Fixed


[Bug middle-end/66568] [CHKP] internal compiler error: in expand_expr_addr_expr_1

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66568

Ilya Enkovich ienkovich at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Fixed


[Bug other/65530] [meta-bug] -mmpx -fcheck-pointer-bounds failures

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65530
Bug 65530 depends on bug 66134, which changed state.

Bug 66134 Summary: [CHKP] ICE: Unable to coalesce ssa_names 18 and 17 which are 
marked as MUST COALESCE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66134

   What|Removed |Added

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


[Bug other/65530] [meta-bug] -mmpx -fcheck-pointer-bounds failures

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65530
Bug 65530 depends on bug 66048, which changed state.

Bug 66048 Summary: [i386] ICE in create_pre_exit when both AVX and MPX are used
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66048

   What|Removed |Added

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


[Bug middle-end/66567] [CHKP] internal compiler error: in assign_parms

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66567

Ilya Enkovich ienkovich at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Fixed


[Bug middle-end/66134] [CHKP] ICE: Unable to coalesce ssa_names 18 and 17 which are marked as MUST COALESCE

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66134

Ilya Enkovich ienkovich at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Fixed


[Bug other/65530] [meta-bug] -mmpx -fcheck-pointer-bounds failures

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65530
Bug 65530 depends on bug 66567, which changed state.

Bug 66567 Summary: [CHKP] internal compiler error: in assign_parms
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66567

   What|Removed |Added

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


[Bug rtl-optimization/66048] [i386] ICE in create_pre_exit when both AVX and MPX are used

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66048

Ilya Enkovich ienkovich at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #6 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Fixed


[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

2015-07-23 Thread noloader at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #24 from Jeffrey Walton noloader at gmail dot com ---
(In reply to Manuel López-Ibáñez from comment #23)
 (In reply to Manuel López-Ibáñez from comment #21)
  Now that you posted a complete example here:
  https://gcc.gnu.org/ml/gcc-help/2015-07/msg00070.html you seem to actually
  be hitting PR66290, not this one.
 
 Sorry, I meant PR64079.

NP. In that example I posted, I meant GCC_DIAGNOSTIC_AWARE, not
GCC_OPTIMIZE_AWARE. Sorry about that.

[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

2015-07-23 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #19 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
For what is worth, anyone please feel free to take my WIP patch in comment #10
and get it finished. You may also claim for yourself any bounty or compensation
that may derive from it.

[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

2015-07-23 Thread noloader at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #22 from Jeffrey Walton noloader at gmail dot com ---
(In reply to Jonathan Wakely from comment #18)
 ...
 Or you could just change the code causing the warnings.

Fair enough.

There are two warnings that are big offenders. First is the unused variable
warning due to a static assert. I asked for help with it at
https://gcc.gnu.org/ml/gcc-help/2015-07/msg00070.html.

Second is the unknown pragma warning. Here's part of the problem, but I don't
expect much to come of it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431.
Here's another piece of the same problem:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66943.

I really don't understand the 66942 warning since GCC is an OpenMP conforming
compiler. '#pragma omp' is known to it in all configurations. The only thing
that changes is OMP is active when '-fopenmp' is passed on the command line.

Jeff


[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

2015-07-23 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #21 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
(In reply to Manuel López-Ibáñez from comment #14)
 (In reply to Jeffrey Walton from comment #13)
  #if GCC_DIAGNOSTIC_AWARE
  # pragma GCC diagnostic push
  # pragma GCC diagnostic ignored -Wunused-value
  # pragma GCC diagnostic ignored -Wunused-variable
  #endif
 
 As far as I understand, the #pragma should work as expected for those two
 warnings. Only those warnings given during preprocessing and lexing are
 affected by this bug.

Now that you posted a complete example here:
https://gcc.gnu.org/ml/gcc-help/2015-07/msg00070.html you seem to actually be
hitting PR66290, not this one.

[Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2

2015-07-23 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930

--- Comment #10 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Kazumoto Kojima from comment #6)
 Created attachment 36040 [details]
 .i file for gengtype.c
 
 I've confirmed a miscompile for gengtype.c with -O1 on my 5/6
 compilers.  With them,
 
  if (union_p)
{
oprintf (d-of, %*sbreak;\n, d-indent, );
d-indent -= 2;
}
 
 lines in gengtype.c:walk_type function are compiled like as:
 
 bf  .L2253
 mov.l   .L2593,r7
 mov.l   @(36,r12),r6
 mov.l   .L2580,r5
 mov.l   .L2595,r1
 jsr @r1
   ...
 
 i.e. the instruction testing union_p variable is removed.
 The resulted gengtype produces files without break in many
 cases.  Although it's the other way around with the reported
 full of break symptom, I think the both are the same issue.
 The deletion has happened in sh_split_movrt_negc_to_movt_xor
 which is called by movrt_negc insn_and_split.  It seems that
 that splitting is applied for the case
 
   tst reg,reg
   mov #-1,reg1
   negcreg1,reg1
 ...
 call ...
 ...
   tst reg,reg
 
 and the last tst was removed.  Oleg, could you take a look into
 this?

Somehow I couldn't find the code patterns above in my version of the compiled
code, so I've compared the compiled asm code of gengtype.ii with
sh_split_movrt_negc_to_movt_xor and without (always returns false) at -O1 and
hit this diff:

without:
mov.l   @(40,r15),r0
cmp/eq  #5,r0
mov #-1,r0
negcr0,r0
mov.b   r0,@(2,r8)
mov r12,r5
mov.l   .L2664,r1
jsr @r1
mov.l   @(8,r10),r4
mov r14,r0
mov.b   r0,@(2,r8)
mov.l   .L2631,r1
jsr @r1
mov r13,r4
mov.l   @(40,r15),r0
cmp/eq  #5,r0
bf  .L2286

with:
mov.l   @(44,r15),r0
cmp/eq  #5,r0
movtr0
xor #1,r0
mov.b   r0,@(2,r8)
mov r12,r5
mov.l   .L2664,r1
jsr @r1
mov.l   @(8,r10),r4
mov r14,r0
mov.b   r0,@(2,r8)
mov.l   .L2631,r1
jsr @r1
mov r13,r4
bf  .L2286

The original idea of this transformation is to not clobber the T bit with the
negc-movrt insn and re-use the T bit later.  It seems that it's missing the
fact that the T bit is clobbered by calls.  The following seems to fix it:

Index: gcc/config/sh/sh.c
===
--- gcc/config/sh/sh.c  (revision 225987)
+++ gcc/config/sh/sh.c  (working copy)
@@ -13888,6 +13888,7 @@
!sh_insn_operands_modified_between_p (t_before_negc.insn,
   t_before_negc.insn,
   t_after_negc.insn)
+   !modified_between_p (get_t_reg_rtx (), curr_insn, t_after_negc.insn)
!sh_unspec_insn_p (t_after_negc.insn)
!volatile_insn_p (PATTERN (t_after_negc.insn))
!side_effects_p (PATTERN (t_after_negc.insn))

I've added this code as part of PR 63986.  I've checked with make -k check-gcc
RUNTESTFLAGS=sh.exp --target_board=sh-sim\{-m2a/-mb,-m4/-ml,-m4/-mb} that
there are no new SH specific fails, so I assume the patch above should be OK
(although all the checks should probably be combined to avoid walking the insns
repeatedly).  Could you please add it to your test run?  I'm sorry for this
nasty bug.  Obviously it's not only a problem for -O1 but for anything  -O0.

[Bug c++/64079] %+D in diagnostics breaks pragma GCC diagnostic

2015-07-23 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64079

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||diagnostic

--- Comment #2 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
Another example of this: https://gcc.gnu.org/ml/gcc-help/2015-07/msg00070.html

[Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2

2015-07-23 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930

--- Comment #13 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Kazumoto Kojima from comment #12)
 
 --- a/config/sh/sh-protos.h
 +++ b/config/sh/sh-protos.h
 @@ -198,7 +198,7 @@ sh_find_set_of_reg (rtx reg, rtx_insn* insn, F stepfunc,
  {
if (BARRIER_P (result.insn))
   break;
 -  if (!NONJUMP_INSN_P (result.insn))
 +  if (!NONJUMP_INSN_P (result.insn)  !CALL_P (result.insn))
   continue;
if (reg_set_p (reg, result.insn))
   {
 
 and it works like as my expectation, though I'm not sure whether it's
 a right thing or not.

This would be OK for hardregs (which are clobbered by calls).  When working on
pseudos, it's actually OK to ignore calls.  Maybe it'd be a good idea to extend
sh_find_set_of_reg to check for call clobbered hardregs only.  This will make
the function easier to use.

[Bug middle-end/25530] (unsigned / 2)*2 is not changed into unsigned ~1

2015-07-23 Thread naveenh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25530

--- Comment #3 from naveenh at gcc dot gnu.org ---
Author: naveenh
Date: Fri Jul 24 04:50:41 2015
New Revision: 226137

URL: https://gcc.gnu.org/viewcvs?rev=226137root=gccview=rev
Log:
PR middle-end/25530
2015-07-24  Naveen H.S  naveen.hurugalaw...@caviumnetworks.com

gcc/testsuite/ChangeLog:
* gcc.dg/pr25530.c: New test.

gcc/ChangeLog:
* match.pd (mult (trunc_div @0 integer_pow2p@1) @1) : New simplifier.


Added:
trunk/gcc/testsuite/gcc.dg/pr25530.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog


[Bug middle-end/25529] (unsigned * 2)/2 is not changed into unsigned 0x7FFFFFFF

2015-07-23 Thread naveenh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25529

--- Comment #2 from naveenh at gcc dot gnu.org ---
Author: naveenh
Date: Fri Jul 24 04:47:48 2015
New Revision: 226136

URL: https://gcc.gnu.org/viewcvs?rev=226136root=gccview=rev
Log:
PR middle-end/25529
2015-07-24  Naveen H.S  naveen.hurugalaw...@caviumnetworks.com

gcc/testsuite/ChangeLog:
* gcc.dg/pr25529.c: New test.

gcc/ChangeLog:
* match.pd (trunc_div (mult @0 integer_pow2p@1) @1) : New simplifier.


Added:
trunk/gcc/testsuite/gcc.dg/pr25529.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd
trunk/gcc/testsuite/ChangeLog


[Bug c++/66962] [concepts] overloaded function causing memory blow-up and ICE

2015-07-23 Thread eric.niebler at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962

--- Comment #1 from Eric Niebler eric.niebler at gmail dot com ---
This is a blocker for STL2.


[Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG

2015-07-23 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66752

--- Comment #8 from Jeffrey A. Law law at redhat dot com ---
After tracking down a couple bugs in the FSM support, I'm about ready to check
in a patch that should address the missed jump threads.


[Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG

2015-07-23 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66752

Jeffrey A. Law law at redhat dot com changed:

   What|Removed |Added

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

--- Comment #10 from Jeffrey A. Law law at redhat dot com ---
Should be fixed on the trunk.  If you could verify that 255.vortex's
performance has improved, it'd be appreciated.

Thanks.


[Bug c++/66962] [concepts] overloaded function causing memory blow-up and ICE

2015-07-23 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962

--- Comment #5 from Casey Carter Casey at Carter dot net ---
(In reply to Markus Trippelsdorf from comment #2)
 /usr/local/gcc-concepts/include/c++/6.0.0/initializer_list:47:11: fatal
 error: definition of std::initializer_list does not match #include
 initializer_list

This is because the definition of std::initializer_list in the preprocessed
source doesn't agree with your compiler's - or mine - notion of what
std::initializer_list should be.

We need a more recent test case.


[Bug c++/66962] [concepts] overloaded function causing memory blow-up and ICE

2015-07-23 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962

--- Comment #7 from Casey Carter Casey at Carter dot net ---
Created attachment 36044
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36044action=edit
Manually flattened test case

Doesn't include the contents of any system headers.


[Bug c++/66962] [concepts] overloaded function causing memory blow-up and ICE

2015-07-23 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 CC||trippels at gcc dot gnu.org

--- Comment #2 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
I cannot reproduce the issue:

In file included from /usr/local/gcc-concepts/include/c++/6.0.0/utility:76:0,
 from ../cmcstl2/include/stl2/detail/fwd.hpp:4,
 from ../cmcstl2/include/stl2/iterator.hpp:4,
 from ../cmcstl2/test/iterator.cpp:4:
/usr/local/gcc-concepts/include/c++/6.0.0/initializer_list:47:11: fatal error:
definition of std::initializer_list does not match #include initializer_list
compilation terminated.


[Bug c++/64079] %+D in diagnostics breaks pragma GCC diagnostic

2015-07-23 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64079

--- Comment #6 from Jason Merrill jason at gcc dot gnu.org ---
(In reply to Paolo Carlini from comment #5)
 Thanks Manu. I'm going to take care of this specific issue. I will also ask
 if patches proactively replacing those +D and +#D in the C++ front-end are
 welcome at this time.

Such changes are pre-approved.


[Bug lto/66752] spec2000 255.vortex performance compiled with GCC is ~20% lower than with CLANG

2015-07-23 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66752

--- Comment #9 from Jeffrey A. Law law at gcc dot gnu.org ---
Author: law
Date: Thu Jul 23 20:42:15 2015
New Revision: 226125

URL: https://gcc.gnu.org/viewcvs?rev=226125root=gccview=rev
Log:
PR lto/66752
* tree-ssa-threadedge.c (simplify_conrol_stmt_condition): If we are
unable to find X NE 0 in the tables, return X as the simplified
condition.
(fsm_find_control_statement_thread_paths): If nodes in NEXT_PATH are
in VISISTED_BBS, then return failure.  Else add nodes from NEXT_PATH
to VISISTED_BBS.  */
* tree-ssa-threadupdate.c (duplicate_thread_path): Fix up edge flags
after removing the control flow statement and unnecessary edges.

testsuite/
PR lto/66752
* gcc.dg/tree-ssa/pr66752-2.c: New test.
* gcc.dg/torture/pr66752-1.c: New test
* g++.dg/torture/pr66752-2.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/torture/pr66752-2.C
trunk/gcc/testsuite/gcc.dg/torture/pr66752-1.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr66752-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-threadedge.c
trunk/gcc/tree-ssa-threadupdate.c


[Bug tree-optimization/61929] [Graphite]: Banerjee and Omega differ on distance vectors (internal compiler error in compute_affine_dependence)

2015-07-23 Thread nheghathivhistha at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61929

--- Comment #13 from David Kredba nheghathivhistha at gmail dot com ---
Do you plan a backport to gcc-5.x branch please?


[Bug middle-end/66983] New: [6 Regression] Many testsuite regressions

2015-07-23 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66983

Bug ID: 66983
   Summary: [6 Regression] Many testsuite regressions
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: aoliva at gcc dot gnu.org
  Target Milestone: ---

On Linux/ia32, r226113 has

FAIL: c-c++-common/dfp/func-vararg-dfp.c execution test
FAIL: c-c++-common/dfp/func-vararg-mixed-2.c execution test
FAIL: c-c++-common/dfp/func-vararg-mixed.c execution test
FAIL: c-c++-common/torture/vector-shift1.c   -O0  execution test
FAIL: c-c++-common/torture/vector-shift1.c   -O0  execution test
FAIL: gcc.c-torture/execute/ieee/pr50310.c execution,  -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions 
FAIL: gcc.c-torture/execute/ieee/pr50310.c execution,  -O3 -g 
FAIL: gcc.dg/compat/scalar-return-dfp c_compat_x_tst.o-c_compat_y_tst.o execute 
FAIL: gcc.dg/torture/pr57748-1.c   -O0  execution test
FAIL: gcc.dg/torture/pr57748-2.c   -O0  execution test
FAIL: gcc.dg/torture/pr57748-3.c   -O0  execution test
FAIL: gcc.dg/torture/pr57748-4.c   -O0  execution test


[Bug target/66217] PowerPC rotate/shift/mask instructions not optimal

2015-07-23 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66217

--- Comment #4 from Segher Boessenkool segher at gcc dot gnu.org ---
Author: segher
Date: Thu Jul 23 14:37:57 2015
New Revision: 226112

URL: https://gcc.gnu.org/viewcvs?rev=226112root=gccview=rev
Log:
PR target/66217
* config/rs6000/rs6000-protos.h (rs6000_emit_2insn_and): Change
prototype.
* config/rs6000/rs6000.c (rs6000_emit_dot_insn): New function.
(rs6000_emit_2insn_and): Handle dot forms.
* config/rs6000/rs6000.md (andmode3): Adjust.
(*andmode3_2insn): Remove TODO.  Adjust.  Add type attr.
(*andmode3_2insn_dot, *andmode3_2insn_dot2): New.

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


[Bug sanitizer/66977] -fsanitize=shift may introduce uninitialized variables

2015-07-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66977

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
   Target Milestone|--- |6.0


[Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2

2015-07-23 Thread olegendo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930

--- Comment #11 from Oleg Endo olegendo at gcc dot gnu.org ---
(In reply to Oleg Endo from comment #10)
 
 I've added this code as part of PR 63986.  I've checked with make -k
 ...

Sorry, by this code I didn't mean the patch in c#10 of this PR, but the
original sh_split_movrt_negc_to_movt_xor related code.


[Bug sanitizer/66908] Uninitialized variable when compiled with UBsan

2015-07-23 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66908

--- Comment #15 from Maxim Ostapenko chefmax at gcc dot gnu.org ---
(In reply to Marek Polacek from comment #14)
 This particular issue is fixed for GCC 6.
 
 Maxim, could you please open a separate PR for the ARM issue?  I'll try to
 fix that one as a follow-up.

Sure, thanks.


[Bug sanitizer/66977] New: -fsanitize=shift may introduce uninitialized variables

2015-07-23 Thread chefmax at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66977

Bug ID: 66977
   Summary: -fsanitize=shift may introduce uninitialized variables
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: sanitizer
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chefmax at gcc dot gnu.org
CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
jakub at gcc dot gnu.org, kcc at gcc dot gnu.org,
mpolacek at gcc dot gnu.org, y.gribov at samsung dot com
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: arm-linux-gnueabi

It looks like that -fsanitize=shift sometimes may introduce uninitialized
variables. This testcase is ARM specific, but I suppose this may be reproduced
on other targets too.

For arm-linux-gnueabi target:

$ cat test.cpp

class Foo {

private:

  int a_;

public:

  Foo (int a) : a_(a) {};

  inline int get_a () { return a_; };
};

int bar (int (Foo::*get)()) {
  Foo *A = new Foo(1);
  int result = (A-*get)();
  delete (A);
  return result;
}

int main () {
  return bar (Foo::get_a);
}

$ armv7l-tizen-linux-gnueabi-g++ -S -fsanitize=shift test.cpp
-fdump-tree-gimple

  D.6138
...
  D.6137 = get.__delta;
  D.6138 = D.6137  1;
  if (D.6138 == 0) goto D.6139; else goto D.6140;
  D.6139:
  iftmp.1 = get.__pfn;
  goto D.6141;
  D.6140:
  A.2 = A;
==   D.6143 = get.__delta;
  D.6144 = D.6143  1;
  D.6145 = (sizetype) D.6144;
  D.6146 = A.2 + D.6145;
  D.6147 = MEM[(int (*__vtbl_ptr_type) () * *)D.6146];
  D.6148 = get.__pfn; 
  D.6149 = (sizetype) D.6148;
  D.6150 = D.6147 + D.6149;
  iftmp.1 = *D.6150;
  D.6141:
  A.3 = A; 
==   
  D.6152 = D.6143  1;
  D.6153 = (sizetype) D.6152;
  D.6154 = A.3 + D.6153;
  result = iftmp.1 (D.6154);

Here, D.6138 = D.6139 = D.6141 introduces uninitialized D.6153 value
and broken *this parameter for called method.

Compiling this testcase with -O2 -Wall option introduces this warning:

$ armv7l-tizen-linux-gnueabi-g++ -S -fsanitize=shift test.cpp -O2 -Wall

test.cpp: In function 'int bar(int (Foo::*)())':
test.cpp:16:26: warning: 'anonymous' may be used uninitialized in this
function [-Wmaybe-uninitialized]
   int result = (A-*get)();

$ armv7l-tizen-linux-gnueabi-g++ -v
Using built-in specs.
COLLECT_GCC=armv7l-tizen-linux-gnueabi-g++
COLLECT_LTO_WRAPPER=/home/max/install/armv7l-tizen/libexec/gcc/armv7l-tizen-linux-gnueabi/6.0.0/lto-wrapper
Target: armv7l-tizen-linux-gnueabi
Configured with: /home/max/src/v6/gcc/configure
--prefix=/home/max/install/armv7l-tizen --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=armv7l-tizen-linux-gnueabi --disable-nls
--enable-poison-system-directories
--with-pkgversion=Tizen.armv7l.GA2.2015-07-15
--with-sysroot=/home/max/install/armv7l-tizen/armv7l-tizen-linux-gnueabi/sys-root
--with-gmp=/home/max/build/v6/fake-root
--with-libelf=/home/max/build/v6/fake-root
--with-mpc=/home/max/build/v6/fake-root
--with-mpfr=/home/max/build/v6/fake-root --without-cloog --without-ppl
--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
--enable-languages=c,c++,fortran --disable-libstdcxx-pch --enable-__cxa_atexit
--enable-libssp --enable-lto --enable-checking=release
--with-build-time-tools=/home/max/install/armv7l-tizen/bin --with-gnu-as
--with-gnu-ld
--with-specs='%{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables}
%{!Werror=unused-local-typedefs:%{!Wno-error=unused-local-typedefs:-Wno-error=unused-local-typedefs}}
%{fuse-linker-plugin|fno-use-linker-plugin|flto|flto=*:;:-fno-use-linker-plugin}'
--disable-multilib --disable-gnu-unique-object --enable-linker-build-id
--with-mode=arm --with-fpu=neon-vfpv4 --with-cpu=cortex-a15.cortex-a7
--with-float=softfp --enable-libgomp --enable-linux-futex


[Bug c++/36587] Feature: add warning for constructor call with discarded return.

2015-07-23 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36587

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #10 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
(In reply to Kaz Kylheku from comment #1)
 Created attachment 15798 [details]
 Implements -Wunused-objects warning for C++.

Patches need to be properly tested and submitted. See
https://gcc.gnu.org/wiki/GettingStarted#Basics:_Contributing_to_GCC_in_10_easy_steps

The few people that have the power to approve patches are very busy and they
very rarely read bugzilla. Patches attached to bugzilla are usually understood
as proof-of-concept or work-in-progress, not actual submissions.

[Bug c++/66976] New: Compiler error for well-formed program with a definition of a constexpr function returning void

2015-07-23 Thread anders.granlund.0 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66976

Bug ID: 66976
   Summary: Compiler error for well-formed program with a
definition of a constexpr function returning void
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: anders.granlund.0 at gmail dot com
  Target Milestone: ---

The following program (prog.cc in the command line below) is well-formed:

  constexpr void f() {}
  int main() {}

Note that the return type void is a literal type according to [basic.types]/10:

  http://eel.is/c++draft/basic.types#10

I compiled the program with the following command line:

  gcc prog.cc -std=c++11 -pedantic-errors

I expected to get no errors since the program is well-formed, but I got the
following error:

prog.cc: In function 'constexpr void f()':
prog.cc:1:16: error: invalid return type 'void' of constexpr function
'constexpr void f()'constexpr void f() {}
^

For comparison Clang accepts the program without errors.

Output for gcc -v (I think the bug quite independent of this however):

Using built-in specs.
COLLECT_GCC=/usr/local/gcc-head/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/gcc-head/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/heads/gcc/gcc-source/configure
--prefix=/usr/local/gcc-head --enable-languages=c,c++ --enable-lto
--disable-multilib --without-ppl --without-cloog-ppl --enable-checking=release
--disable-nls
Thread model: posix
gcc version 6.0.0 20150722 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-o' 'prog.exe' '-std=c++11' '-pedantic-errors' '-v'
'-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/local/gcc-head/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/cc1plus -quiet
-v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE prog.cc -quiet -dumpbase prog.cc
-mtune=generic -march=x86-64 -auxbase prog -pedantic-errors -std=c++11 -version
-o /tmp/ccE6wwKW.s
GNU C++11 (GCC) version 6.0.0 20150722 (experimental)
(x86_64-unknown-linux-gnu)
compiled by GNU C version 6.0.0 20150722 (experimental), GMP version
5.1.2, MPFR version 3.1.2, MPC version 1.0.1
warning: GMP header version 5.1.2 differs from library version 5.0.2.
warning: MPFR header version 3.1.2 differs from library version 3.1.0-p3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory /usr/local/include/x86_64-linux-gnu
ignoring nonexistent directory
/usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/../../../../x86_64-unknown-linux-gnu/include
#include ... search starts here:
#include ... search starts here:

/usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/../../../../include/c++/6.0.0

/usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/../../../../include/c++/6.0.0/x86_64-unknown-linux-gnu

/usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/../../../../include/c++/6.0.0/backward
 /usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/include
 /usr/local/include
 /usr/local/gcc-head/include
 /usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++11 (GCC) version 6.0.0 20150722 (experimental)
(x86_64-unknown-linux-gnu)
compiled by GNU C version 6.0.0 20150722 (experimental), GMP version
5.1.2, MPFR version 3.1.2, MPC version 1.0.1
warning: GMP header version 5.1.2 differs from library version 5.0.2.
warning: MPFR header version 3.1.2 differs from library version 3.1.0-p3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 9115218d8690e08d2bbd8844106c0d12
COLLECT_GCC_OPTIONS='-o' 'prog.exe' '-std=c++11' '-pedantic-errors' '-v'
'-shared-libgcc' '-mtune=generic' '-march=x86-64'
 as -v --64 -o /tmp/cc8TSYhs.o /tmp/ccE6wwKW.s
GNU assembler version 2.22 (x86_64-linux-gnu) using BFD version (GNU Binutils
for Ubuntu) 2.22
COMPILER_PATH=/usr/local/gcc-head/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/:/usr/local/gcc-head/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/:/usr/local/gcc-head/libexec/gcc/x86_64-unknown-linux-gnu/:/usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/:/usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/
LIBRARY_PATH=/usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/:/usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/../../../../lib64/:/lib/x86_64-linux-gnu/:/lib/../lib64/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib64/:/usr/local/gcc-head/lib/gcc/x86_64-unknown-linux-gnu/6.0.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-o' 'prog.exe' '-std=c++11' '-pedantic-errors' '-v'
'-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/local/gcc-head/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/collect2
-plugin

[Bug sanitizer/66908] Uninitialized variable when compiled with UBsan

2015-07-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66908

--- Comment #13 from Marek Polacek mpolacek at gcc dot gnu.org ---
Author: mpolacek
Date: Thu Jul 23 13:54:06 2015
New Revision: 226110

URL: https://gcc.gnu.org/viewcvs?rev=226110root=gccview=rev
Log:
PR sanitizer/66908
* c-ubsan.c: Include gimplify.h.
(ubsan_instrument_division): Unshare OP0 and OP1.
(ubsan_instrument_shift): Likewise.

* c-c++-common/ubsan/pr66908.c: New test.

Added:
trunk/gcc/testsuite/c-c++-common/ubsan/pr66908.c
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-ubsan.c
trunk/gcc/testsuite/ChangeLog


[Bug sanitizer/66908] Uninitialized variable when compiled with UBsan

2015-07-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66908

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #14 from Marek Polacek mpolacek at gcc dot gnu.org ---
This particular issue is fixed for GCC 6.

Maxim, could you please open a separate PR for the ARM issue?  I'll try to fix
that one as a follow-up.


[Bug sanitizer/66977] -fsanitize=shift may introduce uninitialized variables

2015-07-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66977

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-23
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek mpolacek at gcc dot gnu.org ---
Ok, confirmed with a cross to arm-linux-gnueabi:

$ ./cc1plus -quiet -I. q.C -fsanitize=shift -fdump-tree-gimple
-Wmaybe-uninitialized -O
q.C: In function ‘int bar(int (Foo::*)())’:
q.C:16:25: warning: ‘anonymous’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   int result = (A-*get)();
 ^

[Bug c++/66976] Compiler error for well-formed program with a definition of a constexpr function returning void

2015-07-23 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66976

Markus Trippelsdorf trippels at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||trippels at gcc dot gnu.org
 Resolution|--- |INVALID

--- Comment #1 from Markus Trippelsdorf trippels at gcc dot gnu.org ---
void became a literal type in C++14.


[Bug rtl-optimization/64164] [4.9/5/6 Regression] one more stack slot used due to one less inlining level

2015-07-23 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64164

--- Comment #43 from Alexandre Oliva aoliva at gcc dot gnu.org ---
Author: aoliva
Date: Thu Jul 23 15:34:49 2015
New Revision: 226113

URL: https://gcc.gnu.org/viewcvs?rev=226113root=gccview=rev
Log:
[PR64164] Drop copyrename, use coalescible partition as base when optimizing.

for  gcc/ChangeLog

PR rtl-optimization/64164
* Makefile.in (OBJS): Drop tree-ssa-copyrename.o.
* tree-ssa-copyrename.c: Removed.
* opts.c (default_options_table): Drop -ftree-copyrename.  Add
-ftree-coalesce-vars.
* passes.def: Drop all occurrences of pass_rename_ssa_copies.
* common.opt (ftree-copyrename): Ignore.
(ftree-coalesce-inlined-vars): Likewise.
* doc/invoke.texi: Remove the ignored options above.
* gimple-expr.h (gimple_can_coalesce_p): Move declaration
* tree-ssa-coalesce.h: ... here.
* tree-ssa-uncprop.c: Include tree-ssa-coalesce.h and other
headers required by it.
* gimple-expr.c (gimple_can_coalesce_p): Allow coalescing
across variables when flag_tree_coalesce_vars.  Check register
use and promoted modes to allow coalescing.  Moved to
tree-ssa-coalesce.c.
* tree-ssa-live.c (struct tree_int_map_hasher): Move along
with its member functions to tree-ssa-coalesce.c.
(var_map_base_init): Likewise.  Renamed to
compute_samebase_partition_bases.
(partition_view_normal): Drop want_bases parameter.
(partition_view_bitmap): Likewise.
* tree-ssa-live.h: Adjust declarations.
* tree-ssa-coalesce.c: Include explow.h.
(build_ssa_conflict_graph): Process PARM_ and RESULT_DECLs's
default defs at the entry point.
(dump_part_var_map): New.
(compute_optimized_partition_bases): New, called by...
(coalesce_ssa_name): ... when flag_tree_coalesce_vars, instead
of compute_samebase_partition_bases.  Adjust.
* alias.c (nonoverlapping_memrefs_p): Disregard gimple-regs.
* cfgexpand.c (leader_merge): New.
(get_rtl_for_parm_ssa_default_def): New.
(set_rtl): Merge exprs and attrs, even for MEMs and non-SSA
vars.  Update DECL_RTL for PARM_DECLs and RESULT_DECLs too.
(expand_one_stack_var_at): Handle anonymous SSA_NAMEs.  Drop
redundant MEM attr setting.
(expand_one_stack_var_1): Handle anonymous SSA_NAMEs.  Renamed
from...
(expand_one_stack_var): ... this.  New wrapper to check and
skip already expanded SSA partitions.
(record_alignment_for_reg_var): New, factored out of...
(expand_one_var): ... this.
(expand_one_ssa_partition): New.
(adjust_one_expanded_partition_var): New.
(expand_one_register_var): Check and skip already expanded SSA
partitions.
(expand_used_vars): Don't create DECLs for anonymous SSA
names.  Expand all SSA partitions, then adjust all SSA names.
(pass::execute): Replace the loops that set
SA.partition_to_pseudo from partition leaders and cleared
DECL_RTL for multi-location variables, and that which used to
rename vars and set attrs, with one that clears DECL_RTL and
checks that PARMs and RESULTs default_defs match DECL_RTL.
* cfgexpand.h (get_rtl_for_parm_ssa_default_def): Declare.
* emit-rtl.c (set_reg_attrs_for_parm): Handle NULL decl.
* explow.c (promote_ssa_mode): New.
* explow.h (promote_ssa_mode): Declare.
* expr.c (expand_expr_real_1): Handle anonymous SSA_NAMEs.
* function.c: Include cfgexpand.h.
(use_register_for_decl): Handle SSA_NAMEs, anonymous or not.
(use_register_for_parm_decl): Wrapper for the above to
special-case the result_ptr.
(rtl_for_parm): Ditto for get_rtl_for_parm_ssa_default_def.
(split_complex_args): Take assign_parm_data_all argument.
Pass it to rtl_for_parm.  Set up rtl and context for split
args.
(assign_parms_augmented_arg_list): Adjust.
(maybe_reset_rtl_for_parm): Reset DECL_RTL of parms with
multiple locations.  Recognize split complex args.
(assign_parm_adjust_stack_rtl): Add all and parm arguments,
for rtl_for_parm.  For SSA-assigned parms, zero stack_parm.
(assign_parm_setup_block): Prefer SSA-assigned location.
(assign_parm_setup_reg): Likewise.  Use entry_parm for equiv
if stack_parm is NULL.
(assign_parm_setup_stack): Prefer SSA-assigned location.
(assign_parms): Maybe reset DECL_RTL of params.  Adjust stack
rtl before testing for pointer bounds.  Special-case result_ptr.
(expand_function_start): Maybe reset DECL_RTL of result.
Prefer SSA-assigned location for result and static chain.
Factor out DECL_RESULT and SET_DECL_RTL.
* tree-outof-ssa.c (insert_value_copy_on_edge): Handle

[Bug ipa/66760] [4.9/5 Regression] compile time regression in IPA inline analysis on PR26854 testcase

2015-07-23 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66760

--- Comment #6 from Martin Jambor jamborm at gcc dot gnu.org ---
Author: jamborm
Date: Thu Jul 23 16:09:56 2015
New Revision: 226114

URL: https://gcc.gnu.org/viewcvs?rev=226114root=gccview=rev
Log:
2015-07-23  Martin Jambor  mjam...@suse.cz

Backport from mainline r225838.
2015-07-15  Paolo Bonzini  bonz...@gnu.org
Martin Jambor  mjam...@suse.cz

PR ipa/66760
* ipa-inline-analysis.c (unmodified_parm_or_parm_agg_item): Accept
struct func_body_info* instead of struct ipa_node_params*, expecting
fbi-info to be filled in.  Replace throughout.  Adjust call to
ipa_load_from_parm_agg.
(set_cond_stmt_execution_predicate): Accept struct func_body_info*
instead of struct ipa_node_params*.  Adjust calls to other functions
so that they pass either fbi or fbi-info.
(set_switch_stmt_execution_predicate): Likewise.
(will_be_nonconstant_predicate): Likewise.
(compute_bb_predicates): Likewise.
(estimate_function_body_sizes): Move asserts earlier.  Fill in
struct func_body_info, replace parms_info with fbi.info.  Adjust
calls to functions that now accept struct func_body_info.
* ipa-prop.c (param_aa_status, struct ipa_bb_info): Move to ipa-prop.h.
(struct func_body_info): Likewise.
(ipa_load_from_parm_agg_1): Rename to ipa_load_from_parm_agg,
remove static.  Adjust callers.
(ipa_load_from_parm_agg): Remove.
* ipa-prop.h (param_aa_status, ipa_bb_info): Move from ipa-prop.c.
(func_body_info): Likewise.
(ipa_load_from_parm_agg): Adjust prototype.


Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/ipa-inline-analysis.c
branches/gcc-5-branch/gcc/ipa-prop.c
branches/gcc-5-branch/gcc/ipa-prop.h


[Bug c++/64079] %+D in diagnostics breaks pragma GCC diagnostic

2015-07-23 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64079

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||easyhack

--- Comment #4 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
BTW, changes like the above are trivial to implement and test, thus this is a
nice easy-hack for beginners.

[Bug tree-optimization/66975] New: parloops to handle signed int reductions

2015-07-23 Thread vries at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66975

Bug ID: 66975
   Summary: parloops to handle signed int reductions
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

With this ( https://gcc.gnu.org/ml/gcc-cvs/2015-07/msg00896.html ) fix we
introduce xfails for signed int reductions:
...
* gcc.dg/autopar/outer-4.c: Add xfail.
* gcc.dg/autopar/outer-5.c: Same.
* gcc.dg/autopar/outer-6.c: Same.
* gcc.dg/autopar/reduc-2.c: Same.
* gcc.dg/autopar/reduc-2char.c: Same.
* gcc.dg/autopar/reduc-2short.c: Same.
* gcc.dg/autopar/reduc-8.c: Same.
...

The problem is that when parallelizing reductions in parloops, we change the
order of evaluation, which can mean that we introduce an overflow, where there
was none before. This only yields the same result if the overflow behaviour can
be assumed to wrap. The fix adds this missing check.

However, we can convert the signed reduction to an unsigned one, correctly
parallelize it, and cast the result back to signed.


[Bug go/66870] split stack issues on ppc64le and ppc64

2015-07-23 Thread boger at us dot ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66870

--- Comment #14 from boger at us dot ibm.com ---
I did bootstrap a build on ppc64 multilib, using Alan's latest and my patch and
Andreas' patch on a system with glibc = 2.18.  (Without Andreas' patch it
won't bootstrap on the 32 bit build on this system.)


[Bug c++/64079] %+D in diagnostics breaks pragma GCC diagnostic

2015-07-23 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64079

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org,
   ||paolo.carlini at oracle dot com

--- Comment #3 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
Trivial patch, but the issue remains that any use of '+' is potentially a bug.

Index: toplev.c
===
--- toplev.c(revision 225868)
+++ toplev.c(working copy)
@@ -522,14 +522,15 @@ check_global_declaration (tree decl)
(TREE_CODE (decl) != FUNCTION_DECL
  || (!DECL_STATIC_CONSTRUCTOR (decl)
   !DECL_STATIC_DESTRUCTOR (decl)))
   /* Otherwise, ask the language.  */
lang_hooks.decls.warn_unused_global (decl))
-warning ((TREE_CODE (decl) == FUNCTION_DECL)
-? OPT_Wunused_function
- : OPT_Wunused_variable,
-%q+D defined but not used, decl);
+warning_at (DECL_SOURCE_LOCATION (decl),
+   (TREE_CODE (decl) == FUNCTION_DECL)
+   ? OPT_Wunused_function
+   : OPT_Wunused_variable,
+   %qD defined but not used, decl);
 }

 /* Compile an entire translation unit.  Write a file of assembly
output and various debugging dumps.  */

[Bug c++/66572] [6 Regression] Bogus Wlogical-op warning for operands coming from template instantiations

2015-07-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66572

--- Comment #4 from Marek Polacek mpolacek at gcc dot gnu.org ---
Author: mpolacek
Date: Thu Jul 23 18:57:25 2015
New Revision: 226120

URL: https://gcc.gnu.org/viewcvs?rev=226120root=gccview=rev
Log:
PR c++/66572
* pt.c (tsubst_copy_and_build): Add warn_logical_op sentinel.

* g++.dg/warn/Wlogical-op-2.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/warn/Wlogical-op-2.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog


[Bug c++/66572] [6 Regression] Bogus Wlogical-op warning for operands coming from template instantiations

2015-07-23 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66572

Marek Polacek mpolacek at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #5 from Marek Polacek mpolacek at gcc dot gnu.org ---
Fixed.


[Bug target/50818] va_list is filled incorrectly in functions with ms_abi attribute on amd64

2015-07-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50818

Uroš Bizjak ubizjak at gmail dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-07-23
 Ever confirmed|0   |1
   Severity|normal  |enhancement

--- Comment #3 from Uroš Bizjak ubizjak at gmail dot com ---
I was looking into this PR a bit. I'm afraid that this PR is unsolvable with
existing infrastructure, I didn't find a way to access current function
attributes from ix86_build_builtin_va_list. After this is possible, it is just
a matter of changing following line in ix86_build_builtin_va_list:

  return (ix86_abi == MS_ABI) ? ms_va_list : sysv_va_list;

to

  return (ix86_function_abi (fndecl) == MS_ABI) ? ms_va_list :
sysv_va_list;

[Bug c++/64079] %+D in diagnostics breaks pragma GCC diagnostic

2015-07-23 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64079

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-07-23
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com
 Ever confirmed|0   |1

--- Comment #5 from Paolo Carlini paolo.carlini at oracle dot com ---
Thanks Manu. I'm going to take care of this specific issue. I will also ask if
patches proactively replacing those +D and +#D in the C++ front-end are welcome
at this time.


[Bug target/50818] va_list is filled incorrectly in functions with ms_abi attribute on amd64

2015-07-23 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50818

--- Comment #4 from Uroš Bizjak ubizjak at gmail dot com ---
Executable testcase:

--cut here--
int
__attribute__((ms_abi))
foo (int n, ...)
{
  __builtin_va_list ap;
  int sum = 0;

  __builtin_va_start (ap, n);

  while (n--)
sum += __builtin_va_arg (ap, int);

  __builtin_va_end (ap);

  return sum;
}

int main ()
{
  int res = foo (10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);

  if (res != 55)
__builtin_abort ();

  return 0;
}
--cut here--

$ gcc -O2 pr50818.c
$ ./a.out
Segmentation fault (core dumped)
$ gcc -O2 -mabi=ms pr50818.c
$ ./a.out
$

[Bug c++/52987] bogus expected ; before for undeclared type

2015-07-23 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52987

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

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

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com ---
Fixed.


[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

2015-07-23 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #23 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
(In reply to Manuel López-Ibáñez from comment #21)
 Now that you posted a complete example here:
 https://gcc.gnu.org/ml/gcc-help/2015-07/msg00070.html you seem to actually
 be hitting PR66290, not this one.

Sorry, I meant PR64079.

[Bug target/58066] __tls_get_addr is called with misaligned stack on x86-64

2015-07-23 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066

--- Comment #19 from uros at gcc dot gnu.org ---
Author: uros
Date: Thu Jul 23 18:51:56 2015
New Revision: 226119

URL: https://gcc.gnu.org/viewcvs?rev=226119root=gccview=rev
Log:
Backport from mainline:
2015-07-17  Uros Bizjak  ubiz...@gmail.com

PR rtl-optimization/66891
* calls.c (expand_call): Wrap precompute_register_parameters with
NO_DEFER_POP/OK_DEFER_POP to prevent deferred pops.

2015-07-15  Uros Bizjak  ubiz...@gmail.com

PR target/58066
* config/i386/i386.md (*tls_global_dynamic_64_mode): Depend on
SP_REG.
(*tls_local_dynamic_base_64_mode): Ditto.
(*tls_local_dynamic_base_64_largepic): Ditto.
(tls_global_dynamic_64_mode): Update expander pattern.
(tls_local_dynamic_base_64_mode): Ditto.

2015-07-15  Uros Bizjak  ubiz...@gmail.com

PR rtl-optimization/58066
* calls.c (expand_call): Precompute register parameters before stack

testsuite/ChangeLog:

Backport from mainline:
2015-07-17  Uros Bizjak  ubiz...@gmail.com

PR target/66891
* gcc.target/i386/pr66891.c: New test.


Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr66891.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/calls.c
branches/gcc-5-branch/gcc/config/i386/i386.md
branches/gcc-5-branch/gcc/testsuite/ChangeLog


[Bug rtl-optimization/66891] [6 Regression] ICE in expand_call, at calls.c:3407

2015-07-23 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66891

--- Comment #6 from uros at gcc dot gnu.org ---
Author: uros
Date: Thu Jul 23 18:51:56 2015
New Revision: 226119

URL: https://gcc.gnu.org/viewcvs?rev=226119root=gccview=rev
Log:
Backport from mainline:
2015-07-17  Uros Bizjak  ubiz...@gmail.com

PR rtl-optimization/66891
* calls.c (expand_call): Wrap precompute_register_parameters with
NO_DEFER_POP/OK_DEFER_POP to prevent deferred pops.

2015-07-15  Uros Bizjak  ubiz...@gmail.com

PR target/58066
* config/i386/i386.md (*tls_global_dynamic_64_mode): Depend on
SP_REG.
(*tls_local_dynamic_base_64_mode): Ditto.
(*tls_local_dynamic_base_64_largepic): Ditto.
(tls_global_dynamic_64_mode): Update expander pattern.
(tls_local_dynamic_base_64_mode): Ditto.

2015-07-15  Uros Bizjak  ubiz...@gmail.com

PR rtl-optimization/58066
* calls.c (expand_call): Precompute register parameters before stack

testsuite/ChangeLog:

Backport from mainline:
2015-07-17  Uros Bizjak  ubiz...@gmail.com

PR target/66891
* gcc.target/i386/pr66891.c: New test.


Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/pr66891.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/calls.c
branches/gcc-5-branch/gcc/config/i386/i386.md
branches/gcc-5-branch/gcc/testsuite/ChangeLog


[Bug c++/66976] Compiler error for well-formed program with a definition of a constexpr function returning void

2015-07-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66976

--- Comment #2 from Jonathan Wakely redi at gcc dot gnu.org ---
(In reply to Anders Granlund from comment #0)
 For comparison Clang accepts the program without errors.

Not if you use -std=c++11 it doesn't.

Both GCC and Clang reject it with -std=c++11 and accept it with -std=c++14, as
expected.

N.B. we don't need the full output of compiling with -v, just the output of
'gcc -v' is enough (and much less verbose).


[Bug middle-end/66945] ICE in generic_simplify (generic-match.c:24790)

2015-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66945

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org ---
Fixed.


[Bug fortran/64986] class_to_type_4.f90: valgrind error: Invalid read/write of size 8

2015-07-23 Thread paul.richard.thomas at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64986

--- Comment #13 from paul.richard.thomas at gmail dot com paul.richard.thomas 
at gmail dot com ---
Dear Mikael,

A good principle in general is to assume cock-up, rather than
conspiracy :-) The reason for this spreading between two functions is
incremental development done at very different times. If you can see a
way to rationalize the implementation, please do it.

Many thanks for the patch - assume that it is OK for trunk and 5.x

Paul

On 22 July 2015 at 18:24, mikael at gcc dot gnu.org
gcc-bugzi...@gcc.gnu.org wrote:
 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64986

 --- Comment #12 from Mikael Morin mikael at gcc dot gnu.org ---
 (In reply to Dominique d'Humieres from comment #6)
 The test has been introduced at revision r220482,

 That revision adds interesting comments:

  /* For a function with a class array result, save the result as
 a temporary, set the info fields needed by the scalarizer and
 call the finalization function of the temporary. Note that the
 nullification of allocatable components needed by the result
 is done in gfc_trans_assignment_1.  */

 and in gfc_trans_assignment_1, there is:

 /* Nullify the allocatable components corresponding to those of the lhs
derived type, so that the finalization of the function result does not
affect the lhs of the assignment. Prepend is used to ensure that the
nullification occurs before the call to the finalizer.


 So, if finalization for derived types with allocatable components means 
 freeing
 the allocatable components, the above is more or less a justification for the
 patch in comment #9.

 What I don't understand is why there is need for two functions
 gfc_conv_procedure_call and gfc_trans_assignment_1 doing half of the job, and
 why deallocation of components, deallocation of whole allocatable and
 finalization are not handled all at once in a single place.

 --
 You are receiving this mail because:
 You are on the CC list for the bug.


[Bug middle-end/66916] [6 Regression] FAIL: gcc.target/arm/pr43920-2.c object-size text = 54

2015-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66916

Richard Biener rguenth at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from Richard Biener rguenth at gcc dot gnu.org ---
Should be fixed now.


[Bug middle-end/66916] [6 Regression] FAIL: gcc.target/arm/pr43920-2.c object-size text = 54

2015-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66916

--- Comment #5 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Thu Jul 23 07:29:53 2015
New Revision: 226089

URL: https://gcc.gnu.org/viewcvs?rev=226089root=gccview=rev
Log:
2015-07-23  Richard Biener  rguent...@suse.de

PR middle-end/66916
* match.pd: Guard widen and sign-change comparison simplification
with single_use.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/match.pd


[Bug middle-end/66945] ICE in generic_simplify (generic-match.c:24790)

2015-07-23 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66945

--- Comment #3 from Richard Biener rguenth at gcc dot gnu.org ---
Author: rguenth
Date: Thu Jul 23 07:23:23 2015
New Revision: 226088

URL: https://gcc.gnu.org/viewcvs?rev=226088root=gccview=rev
Log:
2015-07-23  Richard Biener  rguent...@suse.de

PR tree-optimization/66945
* tree-ssa-propagate.c (substitute_and_fold_dom_walker
::before_dom_children): Force the propagators idea of
non-executable edges to materialize, not what the folder
chooses.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr66945.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-propagate.c


[Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2

2015-07-23 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930

--- Comment #7 from John Paul Adrian Glaubitz glaubitz at physik dot 
fu-berlin.de ---
(In reply to Kazumoto Kojima from comment #6)
 Created attachment 36040 [details]
 .i file for gengtype.c
 
 I've confirmed a miscompile for gengtype.c with -O1 on my 5/6
 compilers.

Just for confirmation. Removing -O1 and defaulting to -O2 again lets the
current gcc-5 snapshot build past this particular issue.

Interesting that this is triggered with -O1 and not -O2. I'd expected that to
be the other way around.

 BTW, I guess that
 
  * Build with -O1 on sh4 (try to work around PR target/66358).
 
 will open a can of worms :-)

What do you mean? Using -O1 will trigger all kinds of bugs? Or is it rather
about PR target/66358?

Adrian


[Bug c++/52987] bogus expected ; before for undeclared type

2015-07-23 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52987

--- Comment #3 from paolo at gcc dot gnu.org paolo at gcc dot gnu.org ---
Author: paolo
Date: Thu Jul 23 10:11:48 2015
New Revision: 226097

URL: https://gcc.gnu.org/viewcvs?rev=226097root=gccview=rev
Log:
/cp
2015-07-23  Paolo Carlini  paolo.carl...@oracle.com

PR c++/52987
* parser.c (cp_parser_simple_declaration): Robustify check avoiding
redundant error messages.

/testsuite
2015-07-23  Paolo Carlini  paolo.carl...@oracle.com

PR c++/52987
* g++.dg/parse/error57.C: New.
* g++.dg/expr/string-2.C: Update.

Added:
trunk/gcc/testsuite/g++.dg/parse/error57.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/parser.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/expr/string-2.C


[Bug rtl-optimization/66048] [i386] ICE in create_pre_exit when both AVX and MPX are used

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66048

--- Comment #5 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Author: ienkovich
Date: Thu Jul 23 10:19:03 2015
New Revision: 226098

URL: https://gcc.gnu.org/viewcvs?rev=226098root=gccview=rev
Log:
gcc/

Backport from mainline r223114.
2015-05-13  Ilya Enkovich  ilya.enkov...@intel.com

PR target/66048
* function.c (diddle_return_value_1): Process bounds first.
* config/i38/i386.c (ix86_function_value_regno_p): Add bnd1
register.

gcc/testsuite/

Backport from mainline r223114.
2015-05-13  Ilya Enkovich  ilya.enkov...@intel.com

PR target/66048
* gcc.target/i386/mpx/pr66048.cc: New.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/mpx/pr66048.cc
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/config/i386/i386.c
branches/gcc-5-branch/gcc/function.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog


[Bug middle-end/66134] [CHKP] ICE: Unable to coalesce ssa_names 18 and 17 which are marked as MUST COALESCE

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66134

--- Comment #2 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Author: ienkovich
Date: Thu Jul 23 10:22:21 2015
New Revision: 226099

URL: https://gcc.gnu.org/viewcvs?rev=226099root=gccview=rev
Log:
gcc/

Backport from mainline r223215.
2015-05-15  Ilya Enkovich  enkovich@gmail.com

PR middle-end/66134
* tree-chkp.c (chkp_get_orginal_bounds_for_abnormal_copy): New.
(chkp_maybe_copy_and_register_bounds): Don't copy abnormal copy.

gcc/testsuite/

Backport from mainline r223215.
2015-05-15  Ilya Enkovich  enkovich@gmail.com

PR middle-end/66134
* gcc.target/i386/mpx/pr66134.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/mpx/pr66134.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-chkp.c


[Bug tree-optimization/66974] -Warray-bounds false positive with -O3

2015-07-23 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66974

Manuel López-Ibáñez manu at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||diagnostic
 CC||manu at gcc dot gnu.org

--- Comment #3 from Manuel López-Ibáñez manu at gcc dot gnu.org ---
The reason seems to be that GCC unrolls the inner loop completely to something
like:

if (i / 2 != 0) {
  // i  1
  c[0] += c[i] * c[i-1];
  c[i-1] += c[i] * c[0];
  if (i / 2  1) {
// i  3
c[1] += c[i] * c[i-2];
c[i-2] += c[i] * c[1];
if (i / 2  2) {
// i  5
  c[2] += c[i] * c[i-3];
  c[i-3] += c[i] * c[2];
}
  }
 }

by reasoning that j  3. However, it is not able to remove the two inner
conditions by reasoning that i  3  Since i's upper-bound depends on order and
order is a parameter, it should be able to assume it (or at least say may be
above).

Interestingly, if one changes the function to:

int foo(unsigned order) {
  int c[3] = {1, 2, 3};
  if (order = 5) return 0;
  unsigned i, j;
  for (i = 1; i  order; i++) {
for (j = 0; j  i / 2; j++) {
  c[j] += c[i] * c[i-j-1];
  c[i-j-1] += c[i] * c[j];
}
  }
  return c[0];
}

There is an out-of-bounds access that is not detected by -Warray-bounds, but it
is detected by -Wuninitialized:

test.c:7:16: warning: ‘c[3u]’ may be used uninitialized in this function
[-Wmaybe-uninitialized]
   c[j] += c[i] * c[i-j-1];
^

[Bug target/50818] va_list is filled incorrectly in functions with ms_abi attribute on amd64

2015-07-23 Thread dwmw2 at infradead dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50818

David Woodhouse dwmw2 at infradead dot org changed:

   What|Removed |Added

 CC||dwmw2 at infradead dot org

--- Comment #2 from David Woodhouse dwmw2 at infradead dot org ---
Still broken in 5.1.1.

Note that if you contrive to build it with -mabi=ms on the command line (by
splitting the two functions into separate files and building them separately),
it works fine.

It also works fine if you explicitly use __builtin_ms_va_{list,start,end}.

The problem seems to be that GCC is using the *global* ABI setting to decide
what to do when it sees a plain __builtin_va_list, rather the ABI for the
*current* function.

This is hurting us for UEFI builds too, where only public functions are marked
with __attribute__((ms_abi)) but we need *some* way to make va_list do the
right thing in the general case.


[Bug ipa/66896] ipa-prop.c:2479 runtime error: member call on null pointer of type 'struct ipa_polymorphic_call_context'

2015-07-23 Thread zeccav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66896

--- Comment #6 from Vittorio Zecca zeccav at gmail dot com ---
I just found the same issue at line 2479:
dst_ctx-combine_with (ctx);
dst_ctx is again NULL
Maybe the same patch should be applied here? Namely:
if (!dst_ctx)
{
  vec_safe_grow_cleared
(args-polymorphic_call_contexts,
 count);
  dst_ctx =
ipa_get_ith_polymorhic_call_context (args, i);
}
immediately before?
Do you need a reproducer?
This is compiling pythia software.


[Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2

2015-07-23 Thread kkojima at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930

--- Comment #8 from Kazumoto Kojima kkojima at gcc dot gnu.org ---
(In reply to John Paul Adrian Glaubitz from comment #7)
 What do you mean? Using -O1 will trigger all kinds of bugs? Or is it rather
 about PR target/66358?

Just my 2 cents.  Even on the primary targets, bootstrap with other
than '-g -O2' are not so well tested.  Most packages are built with
-O2, aren't they?  After all, -O1 should work but not safer than -O2,
IMO.  O2 does many optimizations, and some of them might cause bug.
OTOH, some of them simplify the intermediate code.  With -O1, we could
see highly complex intermediate code in some cases and they might cause
problem.  We have just seen an example in this PR.


[Bug target/66930] [5 Regression]: gengtype.c is miscompiled during stage2

2015-07-23 Thread glaubitz at physik dot fu-berlin.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66930

--- Comment #9 from John Paul Adrian Glaubitz glaubitz at physik dot 
fu-berlin.de ---
(In reply to Kazumoto Kojima from comment #8)
 (In reply to John Paul Adrian Glaubitz from comment #7)
  What do you mean? Using -O1 will trigger all kinds of bugs? Or is it rather
  about PR target/66358?
 
 Just my 2 cents.  Even on the primary targets, bootstrap with other
 than '-g -O2' are not so well tested.

Ah, I didn't know that. Really interesting fact!

 Most packages are built with -O2, aren't they?

They are, true.

 After all, -O1 should work but not safer than -O2,
 IMO.  O2 does many optimizations, and some of them might cause bug.
 OTOH, some of them simplify the intermediate code.  With -O1, we could
 see highly complex intermediate code in some cases and they might cause
 problem.  We have just seen an example in this PR.

I agree and, as I said, I already asked Matthias to revert to -O2.

Let's see how far we'll get this time. My board is still building.

Adrian


[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

2015-07-23 Thread noloader at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #17 from Jeffrey Walton noloader at gmail dot com ---
(In reply to Jonathan Wakely from comment #15)
 (In reply to Jeffrey Walton from comment #13)
  This issued caused Crypto++ to remove -Wall (and above) under GCC.
 
 That seems to be throwing the baby out with the bathwater. Why not simply use
 
  -Wall -Wno-unused-value -Wno-unused-variable
 

Here's a concrete example that just hit my inbox:
https://groups.google.com/d/msg/cryptopp-users/ixwCeessWZ8/xR2eOC3-j0MJ.

Its a user who compiling/linking against the library. We can't control what
options he puts on the command line. But he will discuss a noisy compile :)


[Bug middle-end/66567] [CHKP] internal compiler error: in assign_parms

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66567

--- Comment #2 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Author: ienkovich
Date: Thu Jul 23 10:34:48 2015
New Revision: 226100

URL: https://gcc.gnu.org/viewcvs?rev=226100root=gccview=rev
Log:
gcc/

Backport from mainline r224600.
2015-06-18  Ilya Enkovich  enkovich@gmail.com

PR middle-end/66567
* ipa-chkp.c (chkp_maybe_create_clone): Require
functions to be instrumentable.
* tree-chkp.c (chkp_replace_function_pointer): Use
chkp_instrumentable_p instead of attribute check.

gcc/testsuite/

Backport from mainline r224600.
2015-06-18  Ilya Enkovich  enkovich@gmail.com

PR middle-end/66567
* gcc.target/i386/mpx/pr66567.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/mpx/pr66567.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/ipa-chkp.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-chkp.c


[Bug middle-end/66568] [CHKP] internal compiler error: in expand_expr_addr_expr_1

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66568

--- Comment #3 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Author: ienkovich
Date: Thu Jul 23 10:39:26 2015
New Revision: 226101

URL: https://gcc.gnu.org/viewcvs?rev=226101root=gccview=rev
Log:
gcc/

Backport from mainline r224601.
2015-06-18  Ilya Enkovich  enkovich@gmail.com

PR middle-end/66568
* cfgexpand.c (expand_return): Handle missing bounds.
(expand_gimple_stmt_1): Likewise.
* tree-chkp.c (chkp_expand_zero_bounds): New.
* tree-chkp.h (chkp_expand_zero_bounds): New.

gcc/testsuite/

Backport from mainline r224601.
2015-06-18  Ilya Enkovich  enkovich@gmail.com

PR middle-end/66568
* gcc.target/i386/mpx/pr66568.c: New test.

Backport from mainline r225296.
2015-07-01  H.J. Lu  hongjiu...@intel.com

* gcc.target/i386/mpx/pr66568.c (exit): New prototype.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/mpx/pr66568.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/cfgexpand.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog
branches/gcc-5-branch/gcc/tree-chkp.c
branches/gcc-5-branch/gcc/tree-chkp.h


[Bug target/66569] [CHKP] internal compiler error: in assign_by_spills

2015-07-23 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66569

--- Comment #2 from Ilya Enkovich ienkovich at gcc dot gnu.org ---
Author: ienkovich
Date: Thu Jul 23 10:44:19 2015
New Revision: 226102

URL: https://gcc.gnu.org/viewcvs?rev=226102root=gccview=rev
Log:
gcc/

Backport from mainline r224602.
2015-06-18  Ilya Enkovich  enkovich@gmail.com

PR target/66569
* function.c (assign_bounds): Add arguments assign_regs,
assign_special, assign_bt.
(assign_parms): For vararg functions handle bounds in BT
and special slots after incoming vararg bounds.

gcc/testsuite/

Backport from mainline r224602.
2015-06-18  Ilya Enkovich  enkovich@gmail.com

PR target/66569
* gcc.target/i386/mpx/chkp-vararg.c: New test.

Added:
branches/gcc-5-branch/gcc/testsuite/gcc.target/i386/mpx/pr66569.c
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/function.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog


[Bug c++/53431] C++ preprocessor ignores #pragma GCC diagnostic

2015-07-23 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

--- Comment #18 from Jonathan Wakely redi at gcc dot gnu.org ---
You can't control what warnings users enable, but that's no reason not to use
-Wall -Wno-unused yourself when building cryptopp. Not polluting you command
line seems like a weak excuse given the pollution in the code to support
compilers from last millennium (which I know you're getting rid of) and the
pollution that loads of compiler-specific pragmas cause.

The -Wno-xxx options exist, today, and they work, and even if this bug is fixed
it isn't going to be fixed in GCC 4.x or 5.x so the pragmas won't be a complete
solution for many years until noone uses today's compilers.

Or you could just change the code causing the warnings.


[Bug target/66964] Assembler error during ARM cross compile

2015-07-23 Thread alalaw01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66964

--- Comment #7 from alalaw01 at gcc dot gnu.org ---
No new regressions bootstrapping that path on gcc-5-branch (--with-arch=armv7-a
--with-fpu=neon-fp16 --with-float=hard). However, compiling the testcase with
-dp reveals the bad strd's are actually coming from the *movdf_vfp pattern in
vfp.md.


[Bug fortran/66762] ICE when compiling gfortran.dg/submodule_[16].f90 with -flto

2015-07-23 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66762

--- Comment #4 from Dominique d'Humieres dominiq at lps dot ens.fr ---
Created attachment 36041
  -- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36041action=edit
Assembly for gfortran.dg/submodule_1.f90 with -flto

Assembly generated with

gfc /opt/gcc/_clean/gcc/testsuite/gfortran.dg/submodule_1.f08 -flto -save-temps
lto1: error: two or more sections for
.gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.af0e7cdaeebf932b
...

grep lto___foo_interface_MOD___vtab_foo_interface_Foo submodule_1.s
L_GNU_LTO4: ;#
.gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.af0e7cdaeebf932b
L_GNU_LTO7: ;#
.gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.af0e7cdaeebf932b
L_GNU_LTO13:;#
.gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.af0e7cdaeebf932b
.asciz 
.gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.af0e7cdaeebf932b
.asciz 
.gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.af0e7cdaeebf932b
.asciz 
.gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.af0e7cdaeebf932b
.longL$gnu$lto$offs4;#
.gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.af0e7cdaeebf932b
.longL$gnu$lto$offs7;#
.gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.af0e7cdaeebf932b
.longL$gnu$lto$offs13   ;#
.gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.af0e7cdaeebf932b

For gfortran.dg/submodule_6.f08

grep lto___mod_a_MOD___vtab_mod_a_T_a submodule_6.s
L_GNU_LTO10:;# .gnu.lto___mod_a_MOD___vtab_mod_a_T_a.504da200a614bb9e
L_GNU_LTO15:;# .gnu.lto___mod_a_MOD___vtab_mod_a_T_a.504da200a614bb9e
.asciz  .gnu.lto___mod_a_MOD___vtab_mod_a_T_a.504da200a614bb9e
.asciz  .gnu.lto___mod_a_MOD___vtab_mod_a_T_a.504da200a614bb9e
.longL$gnu$lto$offs10   ;#
.gnu.lto___mod_a_MOD___vtab_mod_a_T_a.504da200a614bb9e
.longL$gnu$lto$offs15   ;#
.gnu.lto___mod_a_MOD___vtab_mod_a_T_a.504da200a614bb9e