[Bug fortran/86328] [8/9 Regression] Runtime segfault reading an allocatable class(*) object in allocate statements

2018-08-31 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86328

Paul Thomas  changed:

   What|Removed |Added

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

--- Comment #14 from Paul Thomas  ---
Since I am fixing it, I might as well take it :-)

Paul

[Bug bootstrap/87134] [9 regression] SEGV in cc1 caused by r263875

2018-08-31 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87134

--- Comment #7 from rguenther at suse dot de  ---
On Fri, 31 Aug 2018, ro at CeBiTec dot Uni-Bielefeld.DE wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87134
> 
> --- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE  Uni-Bielefeld.DE> ---
> > --- Comment #5 from rguenther at suse dot de  ---
> [...]
> > I wonder if you can run the testsuite in the not bootstrapped tree
> > and look for sth suspicious.
> 
> I did that now (c and c++ only), but nothing sprang to attention.
> 
> > There is uninitialized memory (but it should never be used...) in
> > the new VN, so a shot in the dark would be
> >
> > Index: gcc/tree-ssa-sccvn.c
> > ===
> > --- gcc/tree-ssa-sccvn.c(revision 263972)
> > +++ gcc/tree-ssa-sccvn.c(working copy)
> > @@ -6240,7 +6240,7 @@ do_rpo_vn (function *fn, edge entry, bit
> >for (int i = 0; i < n; ++i)
> >  bb_to_rpo[rpo[i]] = i;
> >
> > -  unwind_state *rpo_state = XNEWVEC (unwind_state, n);
> > +  unwind_state *rpo_state = XCNEWVEC (unwind_state, n);
> >
> >rpo_elim avail (entry->dest);
> >rpo_avail = &avail;
> 
> Also bootstrapped that right now: doesn't help.  Seems I'll have to go
> the valgrind route.
> 
> > What's your host compiler?  Do you use custom STAGE1_CFLAGS?
> 
> Just a vanilla i386-pc-solaris2.11 gcc 7.1.0.  Nothing special
> (STAGE1_CFLAGS or other).

Hmm, GCC 7.1.0 of course makes me raise eyebrows.  Do you by chance
have another host compiler to cross-test whether it's a host compiler
issue?

[Bug bootstrap/87134] [9 regression] SEGV in cc1 caused by r263875

2018-08-31 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87134

--- Comment #8 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #7 from rguenther at suse dot de  ---
[...]
>> > What's your host compiler?  Do you use custom STAGE1_CFLAGS?
>> 
>> Just a vanilla i386-pc-solaris2.11 gcc 7.1.0.  Nothing special
>> (STAGE1_CFLAGS or other).
>
> Hmm, GCC 7.1.0 of course makes me raise eyebrows.  Do you by chance
> have another host compiler to cross-test whether it's a host compiler
> issue?

Sure: I can try with GCC 8.1.0, too.

[Bug middle-end/87138] [8/9 Regression] wrong code with TI multiplication with -O -march=k8 -fno-tree-fre -mavx512bw

2018-08-31 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87138

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Fri Aug 31 07:49:12 2018
New Revision: 264009

URL: https://gcc.gnu.org/viewcvs?rev=264009&root=gcc&view=rev
Log:
PR middle-end/87138
* expmed.c (expand_mult_const): Use immed_wide_int_const instead of
gen_int_mode.  Formatting fixes.

* gcc.target/i386/avx512bw-pr87138.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/avx512bw-pr87138.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expmed.c
trunk/gcc/testsuite/ChangeLog

[Bug tree-optimization/86816] [8 Regression] ICE: SIGSEGV in tree-ssa-pre / tail_merge_optimize

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86816

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Fri Aug 31 08:33:14 2018
New Revision: 264010

URL: https://gcc.gnu.org/viewcvs?rev=264010&root=gcc&view=rev
Log:
2018-08-31  Richard Biener  

Backport from mainline
2018-08-27  Richard Biener  

PR tree-optimization/86927
* tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
use const cond reduction code.

* gcc.dg/vect/pr86927.c: New testcase.

2018-08-23  Richard Biener  

PR middle-end/87024
* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
calls.

* gcc.dg/pr87024.c: New testcase.

2018-08-22  Richard Biener  

PR tree-optimization/86945
* tree-cfg.c (generate_range_test): Use unsigned arithmetic.

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

2018-08-17  Richard Biener  

PR middle-end/86505
* tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
across a va-arg-pack using call adjust its return value accordingly.

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

2018-08-02  Richard Biener  

PR tree-optimization/86816
* tree-ssa-tail-merge.c (tail_merge_valueize): New function
which checks for value availability before querying it.
(gvn_uses_equal): Use it.
(same_succ_hash): Likewise.
(gimple_equal_p): Likewise.

* g++.dg/torture/pr86816.C: New testcase.

2018-07-17  Richard Biener  

PR lto/86456
* dwarf2out.c (init_sections_and_labels): Always generate
a debug_line_str_section for early LTO debug.
(dwarf2out_finish): Reset debug_line_str_hash output early.
Bump counter for extra dwarf5 .debug_loc labels to not conflict
with fat LTO part.
(dwarf2out_early_finish): Output debug_line_str.

* g++.dg/debug/dwarf2/pr86456.C: New testcase.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/debug/dwarf2/pr86456.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/torture/pr86816.C
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr87024.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86505.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86945.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/vect/pr86927.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dwarf2out.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/tree-cfg.c
branches/gcc-8-branch/gcc/tree-inline.c
branches/gcc-8-branch/gcc/tree-ssa-tail-merge.c
branches/gcc-8-branch/gcc/tree-vect-loop.c

[Bug middle-end/86505] [6/7/8 Regression] __builtin_va_arg_pack_len() computes the number of arguments wrongly

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86505

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Fri Aug 31 08:33:14 2018
New Revision: 264010

URL: https://gcc.gnu.org/viewcvs?rev=264010&root=gcc&view=rev
Log:
2018-08-31  Richard Biener  

Backport from mainline
2018-08-27  Richard Biener  

PR tree-optimization/86927
* tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
use const cond reduction code.

* gcc.dg/vect/pr86927.c: New testcase.

2018-08-23  Richard Biener  

PR middle-end/87024
* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
calls.

* gcc.dg/pr87024.c: New testcase.

2018-08-22  Richard Biener  

PR tree-optimization/86945
* tree-cfg.c (generate_range_test): Use unsigned arithmetic.

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

2018-08-17  Richard Biener  

PR middle-end/86505
* tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
across a va-arg-pack using call adjust its return value accordingly.

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

2018-08-02  Richard Biener  

PR tree-optimization/86816
* tree-ssa-tail-merge.c (tail_merge_valueize): New function
which checks for value availability before querying it.
(gvn_uses_equal): Use it.
(same_succ_hash): Likewise.
(gimple_equal_p): Likewise.

* g++.dg/torture/pr86816.C: New testcase.

2018-07-17  Richard Biener  

PR lto/86456
* dwarf2out.c (init_sections_and_labels): Always generate
a debug_line_str_section for early LTO debug.
(dwarf2out_finish): Reset debug_line_str_hash output early.
Bump counter for extra dwarf5 .debug_loc labels to not conflict
with fat LTO part.
(dwarf2out_early_finish): Output debug_line_str.

* g++.dg/debug/dwarf2/pr86456.C: New testcase.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/debug/dwarf2/pr86456.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/torture/pr86816.C
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr87024.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86505.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86945.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/vect/pr86927.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dwarf2out.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/tree-cfg.c
branches/gcc-8-branch/gcc/tree-inline.c
branches/gcc-8-branch/gcc/tree-ssa-tail-merge.c
branches/gcc-8-branch/gcc/tree-vect-loop.c

[Bug debug/86456] [8 Regression] Segfault in switch_to_section at gcc/varasm.c:7353 since r259317

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86456

--- Comment #10 from Richard Biener  ---
Author: rguenth
Date: Fri Aug 31 08:33:14 2018
New Revision: 264010

URL: https://gcc.gnu.org/viewcvs?rev=264010&root=gcc&view=rev
Log:
2018-08-31  Richard Biener  

Backport from mainline
2018-08-27  Richard Biener  

PR tree-optimization/86927
* tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
use const cond reduction code.

* gcc.dg/vect/pr86927.c: New testcase.

2018-08-23  Richard Biener  

PR middle-end/87024
* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
calls.

* gcc.dg/pr87024.c: New testcase.

2018-08-22  Richard Biener  

PR tree-optimization/86945
* tree-cfg.c (generate_range_test): Use unsigned arithmetic.

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

2018-08-17  Richard Biener  

PR middle-end/86505
* tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
across a va-arg-pack using call adjust its return value accordingly.

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

2018-08-02  Richard Biener  

PR tree-optimization/86816
* tree-ssa-tail-merge.c (tail_merge_valueize): New function
which checks for value availability before querying it.
(gvn_uses_equal): Use it.
(same_succ_hash): Likewise.
(gimple_equal_p): Likewise.

* g++.dg/torture/pr86816.C: New testcase.

2018-07-17  Richard Biener  

PR lto/86456
* dwarf2out.c (init_sections_and_labels): Always generate
a debug_line_str_section for early LTO debug.
(dwarf2out_finish): Reset debug_line_str_hash output early.
Bump counter for extra dwarf5 .debug_loc labels to not conflict
with fat LTO part.
(dwarf2out_early_finish): Output debug_line_str.

* g++.dg/debug/dwarf2/pr86456.C: New testcase.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/debug/dwarf2/pr86456.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/torture/pr86816.C
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr87024.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86505.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86945.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/vect/pr86927.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dwarf2out.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/tree-cfg.c
branches/gcc-8-branch/gcc/tree-inline.c
branches/gcc-8-branch/gcc/tree-ssa-tail-merge.c
branches/gcc-8-branch/gcc/tree-vect-loop.c

[Bug ipa/87024] [6/7/8 Regression] ICE in fold_stmt_1

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87024

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Fri Aug 31 08:33:14 2018
New Revision: 264010

URL: https://gcc.gnu.org/viewcvs?rev=264010&root=gcc&view=rev
Log:
2018-08-31  Richard Biener  

Backport from mainline
2018-08-27  Richard Biener  

PR tree-optimization/86927
* tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
use const cond reduction code.

* gcc.dg/vect/pr86927.c: New testcase.

2018-08-23  Richard Biener  

PR middle-end/87024
* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
calls.

* gcc.dg/pr87024.c: New testcase.

2018-08-22  Richard Biener  

PR tree-optimization/86945
* tree-cfg.c (generate_range_test): Use unsigned arithmetic.

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

2018-08-17  Richard Biener  

PR middle-end/86505
* tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
across a va-arg-pack using call adjust its return value accordingly.

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

2018-08-02  Richard Biener  

PR tree-optimization/86816
* tree-ssa-tail-merge.c (tail_merge_valueize): New function
which checks for value availability before querying it.
(gvn_uses_equal): Use it.
(same_succ_hash): Likewise.
(gimple_equal_p): Likewise.

* g++.dg/torture/pr86816.C: New testcase.

2018-07-17  Richard Biener  

PR lto/86456
* dwarf2out.c (init_sections_and_labels): Always generate
a debug_line_str_section for early LTO debug.
(dwarf2out_finish): Reset debug_line_str_hash output early.
Bump counter for extra dwarf5 .debug_loc labels to not conflict
with fat LTO part.
(dwarf2out_early_finish): Output debug_line_str.

* g++.dg/debug/dwarf2/pr86456.C: New testcase.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/debug/dwarf2/pr86456.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/torture/pr86816.C
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr87024.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86505.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86945.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/vect/pr86927.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dwarf2out.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/tree-cfg.c
branches/gcc-8-branch/gcc/tree-inline.c
branches/gcc-8-branch/gcc/tree-ssa-tail-merge.c
branches/gcc-8-branch/gcc/tree-vect-loop.c

[Bug tree-optimization/86945] [8 Regression] BUG with optimisation of select case statement in gfortran

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86945

--- Comment #11 from Richard Biener  ---
Author: rguenth
Date: Fri Aug 31 08:33:14 2018
New Revision: 264010

URL: https://gcc.gnu.org/viewcvs?rev=264010&root=gcc&view=rev
Log:
2018-08-31  Richard Biener  

Backport from mainline
2018-08-27  Richard Biener  

PR tree-optimization/86927
* tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
use const cond reduction code.

* gcc.dg/vect/pr86927.c: New testcase.

2018-08-23  Richard Biener  

PR middle-end/87024
* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
calls.

* gcc.dg/pr87024.c: New testcase.

2018-08-22  Richard Biener  

PR tree-optimization/86945
* tree-cfg.c (generate_range_test): Use unsigned arithmetic.

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

2018-08-17  Richard Biener  

PR middle-end/86505
* tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
across a va-arg-pack using call adjust its return value accordingly.

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

2018-08-02  Richard Biener  

PR tree-optimization/86816
* tree-ssa-tail-merge.c (tail_merge_valueize): New function
which checks for value availability before querying it.
(gvn_uses_equal): Use it.
(same_succ_hash): Likewise.
(gimple_equal_p): Likewise.

* g++.dg/torture/pr86816.C: New testcase.

2018-07-17  Richard Biener  

PR lto/86456
* dwarf2out.c (init_sections_and_labels): Always generate
a debug_line_str_section for early LTO debug.
(dwarf2out_finish): Reset debug_line_str_hash output early.
Bump counter for extra dwarf5 .debug_loc labels to not conflict
with fat LTO part.
(dwarf2out_early_finish): Output debug_line_str.

* g++.dg/debug/dwarf2/pr86456.C: New testcase.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/debug/dwarf2/pr86456.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/torture/pr86816.C
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr87024.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86505.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86945.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/vect/pr86927.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dwarf2out.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/tree-cfg.c
branches/gcc-8-branch/gcc/tree-inline.c
branches/gcc-8-branch/gcc/tree-ssa-tail-merge.c
branches/gcc-8-branch/gcc/tree-vect-loop.c

[Bug tree-optimization/86927] [8 Regression] Gcc miscompiles at -O3 on valid code

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86927

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Fri Aug 31 08:33:14 2018
New Revision: 264010

URL: https://gcc.gnu.org/viewcvs?rev=264010&root=gcc&view=rev
Log:
2018-08-31  Richard Biener  

Backport from mainline
2018-08-27  Richard Biener  

PR tree-optimization/86927
* tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
use const cond reduction code.

* gcc.dg/vect/pr86927.c: New testcase.

2018-08-23  Richard Biener  

PR middle-end/87024
* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
calls.

* gcc.dg/pr87024.c: New testcase.

2018-08-22  Richard Biener  

PR tree-optimization/86945
* tree-cfg.c (generate_range_test): Use unsigned arithmetic.

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

2018-08-17  Richard Biener  

PR middle-end/86505
* tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
across a va-arg-pack using call adjust its return value accordingly.

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

2018-08-02  Richard Biener  

PR tree-optimization/86816
* tree-ssa-tail-merge.c (tail_merge_valueize): New function
which checks for value availability before querying it.
(gvn_uses_equal): Use it.
(same_succ_hash): Likewise.
(gimple_equal_p): Likewise.

* g++.dg/torture/pr86816.C: New testcase.

2018-07-17  Richard Biener  

PR lto/86456
* dwarf2out.c (init_sections_and_labels): Always generate
a debug_line_str_section for early LTO debug.
(dwarf2out_finish): Reset debug_line_str_hash output early.
Bump counter for extra dwarf5 .debug_loc labels to not conflict
with fat LTO part.
(dwarf2out_early_finish): Output debug_line_str.

* g++.dg/debug/dwarf2/pr86456.C: New testcase.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/debug/dwarf2/pr86456.C
branches/gcc-8-branch/gcc/testsuite/g++.dg/torture/pr86816.C
branches/gcc-8-branch/gcc/testsuite/gcc.dg/pr87024.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86505.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/torture/pr86945.c
branches/gcc-8-branch/gcc/testsuite/gcc.dg/vect/pr86927.c
Modified:
branches/gcc-8-branch/gcc/ChangeLog
branches/gcc-8-branch/gcc/dwarf2out.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/tree-cfg.c
branches/gcc-8-branch/gcc/tree-inline.c
branches/gcc-8-branch/gcc/tree-ssa-tail-merge.c
branches/gcc-8-branch/gcc/tree-vect-loop.c

[Bug debug/86456] [8 Regression] Segfault in switch_to_section at gcc/varasm.c:7353 since r259317

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86456

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||8.2.1
 Resolution|--- |FIXED
  Known to fail||8.2.0

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

[Bug tree-optimization/86816] [8 Regression] ICE: SIGSEGV in tree-ssa-pre / tail_merge_optimize

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86816

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/86927] [8 Regression] Gcc miscompiles at -O3 on valid code

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86927

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/86945] [8 Regression] BUG with optimisation of select case statement in gfortran

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86945

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug bootstrap/87134] [9 regression] SEGV in cc1 caused by r263875

2018-08-31 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87134

--- Comment #9 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
> --- Comment #8 from ro at CeBiTec dot Uni-Bielefeld.DE > Hmm, GCC 7.1.0 of course makes me raise eyebrows.  Do you by chance
>> have another host compiler to cross-test whether it's a host compiler
>> issue?
>
> Sure: I can try with GCC 8.1.0, too.

Just did that on i386-pc-solaris2.11: same ICE in compute_fn_summary, at
ipa-fnsummary.c:2492.

[Bug target/86684] ICE in extract_insn, at recog.c:2304 on ppc64le

2018-08-31 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86684

--- Comment #13 from Segher Boessenkool  ---
Author: segher
Date: Fri Aug 31 08:52:13 2018
New Revision: 264011

URL: https://gcc.gnu.org/viewcvs?rev=264011&root=gcc&view=rev
Log:
rs6000: Make lrounddi2 depend on TARGET_FPRND (PR86684)

TARGET_FPRND should be on for everything ISA 2.04 and later, and
TARGET_VSX implies ISA 2.06 or later; but it is possible to disable
TARGET_FPRND (separately via -mno-fprnd, but also implicitly)
currently, and then things fall down.  This patch makes things not
fall down.


PR target/86684
PR target/87149
* config/rs6000/rs6000.md (lrounddi2): Gate on TARGET_FPRND.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.md

[Bug target/87149] ICE in extract_insn, at recog.c:2305 on ppc64le

2018-08-31 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87149

--- Comment #8 from Segher Boessenkool  ---
Author: segher
Date: Fri Aug 31 08:52:13 2018
New Revision: 264011

URL: https://gcc.gnu.org/viewcvs?rev=264011&root=gcc&view=rev
Log:
rs6000: Make lrounddi2 depend on TARGET_FPRND (PR86684)

TARGET_FPRND should be on for everything ISA 2.04 and later, and
TARGET_VSX implies ISA 2.06 or later; but it is possible to disable
TARGET_FPRND (separately via -mno-fprnd, but also implicitly)
currently, and then things fall down.  This patch makes things not
fall down.


PR target/86684
PR target/87149
* config/rs6000/rs6000.md (lrounddi2): Gate on TARGET_FPRND.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.md

[Bug target/87133] ICE in aggregate_value_p with -frounding-math on ppc64le

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87133

Martin Liška  changed:

   What|Removed |Added

   Priority|P3  |P4

--- Comment #10 from Martin Liška  ---
Having proper assembler, I can't reproduce that.

[Bug target/87163] New: ICE in extract_insn, at recog.c:2305

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87163

Bug ID: 87163
   Summary: ICE in extract_insn, at recog.c:2305
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: segher at gcc dot gnu.org
  Target Milestone: ---
  Host: x86_64-linux-gnu
Target: ppc64le-linux-gnu

Now having proper AS, I see:

$ ppc64le-linux-gnu-gcc
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/signbit-1.c
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/signbit-1.c: In
function ‘do_signbit_if’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/signbit-1.c:8:1:
error: unrecognizable insn:
8 | int do_signbit_if (__ibm128 a) { return __builtin_signbit (a); }
  | ^~~
(insn 7 6 8 2 (set (reg:DF 125)
(float_truncate:DF (reg:IF 124)))
"/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/signbit-1.c":8
-1
 (nil))
during RTL pass: vregs
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/signbit-1.c:8:1:
internal compiler error: in extract_insn, at recog.c:2305
0x55c83d _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/rtl-error.c:108
0x55c859 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/rtl-error.c:116
0x55bd32 extract_insn(rtx_insn*)
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/recog.c:2305
0x79dabf instantiate_virtual_regs_in_insn
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/function.c:1605
0x79dabf instantiate_virtual_regs
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/function.c:1975
0x79dabf execute
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/function.c:2024

[Bug target/87164] New: ICE in output_1236, at config/rs6000/vsx.md:3236

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87164

Bug ID: 87164
   Summary: ICE in output_1236, at config/rs6000/vsx.md:3236
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: segher at gcc dot gnu.org
  Target Milestone: ---
  Host: x86_64-linux-gnu
Target: ppc64le-linux-gnu

Having proper AS I see:

$ ppc64le-linux-gnu-gcc
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/builtins-3-runnable.c
-mpower9-vector -mno-direct-move -O
ppc64le-linux-gnu-gcc: warning: ‘-mno-direct-move’ is deprecated
cc1: warning: ‘-mno-direct-move’ is deprecated
during RTL pass: final
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/builtins-3-runnable.c:
In function ‘test_ll_int_result’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.target/powerpc/builtins-3-runnable.c:98:1:
internal compiler error: in output_1236, at config/rs6000/vsx.md:3236
98 | }
   | ^
0x56e55b output_1236
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/config/rs6000/vsx.md:3236
0x76f724 final_scan_insn_1
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/final.c:3036
0x76fc38 final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/final.c:3149
0x76fefc final_1
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/final.c:2019
0x770914 rest_of_handle_final
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/final.c:4660
0x770914 execute
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/final.c:4734
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c/87162] [6.2.0] Internal compiler error: Error reporting routines re-entered.

2018-08-31 Thread yellowriver2010 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87162

--- Comment #2 from Wen Yang  ---
0x8837da lhd_decl_printable_name(tree_node*, int)
../../gcc-6.2.0/gcc/langhooks.c:222
0x883a36 lhd_print_error_function(diagnostic_context*, char const*,
diagnostic_info*)
../../gcc-6.2.0/gcc/langhooks.c:397
0xa05180 default_tree_diagnostic_starter
../../gcc-6.2.0/gcc/tree-diagnostic.c:48
0x1016f7c diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
../../gcc-6.2.0/gcc/diagnostic.c:824
0x101848d internal_error(char const*, ...)
../../gcc-6.2.0/gcc/diagnostic.c:1258
0x1016903 fancy_abort(char const*, int, char const*)
../../gcc-6.2.0/gcc/diagnostic.c:1327
0x8837da lhd_decl_printable_name(tree_node*, int)
../../gcc-6.2.0/gcc/langhooks.c:222
0x883a36 lhd_print_error_function(diagnostic_context*, char const*,
diagnostic_info*)
../../gcc-6.2.0/gcc/langhooks.c:397
0xa05180 default_tree_diagnostic_starter
../../gcc-6.2.0/gcc/tree-diagnostic.c:48
0x1016f7c diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
../../gcc-6.2.0/gcc/diagnostic.c:824
0x101848d internal_error(char const*, ...)
../../gcc-6.2.0/gcc/diagnostic.c:1258
0x9c817f crash_signal
../../gcc-6.2.0/gcc/toplev.c:333
0x6f116e calculate_dominance_info(cdi_direction)
../../gcc-6.2.0/gcc/dominance.c:633
0x9cf05a gate_tm_init
../../gcc-6.2.0/gcc/trans-mem.c:2100
0x91808d dump_one_pass
../../gcc-6.2.0/gcc/passes.c:908
0x91808d dump_pass_list
../../gcc-6.2.0/gcc/passes.c:930
0x918c14 gcc::pass_manager::dump_passes() const
../../gcc-6.2.0/gcc/passes.c:957
0x6bf708 symbol_table::finalize_compilation_unit()
../../gcc-6.2.0/gcc/cgraphunit.c:2538

[Bug c++/87165] New: Did you mean hints candidates equality

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87165

Bug ID: 87165
   Summary: Did you mean hints candidates equality
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

Hi David.

Richi pointed out that for some wrong options the hint is not ideal. Let's
consider:

./xgcc -B. -c /tmp/empty.c -std=c++19
xgcc: error: unrecognized command line option ‘-std=c++19’; did you mean
‘-std=c++11’?

Valid candidates with one character diff are:

-std=c++11
-std=c++14
-std=c++17
-std=c++1y
-std=c++1z

Maybe we can prioritize the biggest number? Or closest according to character
diffrence '9' - '7' ?

[Bug c++/87165] Did you mean hints candidates equality

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87165

Martin Liška  changed:

   What|Removed |Added

   Severity|normal  |enhancement

[Bug c++/87165] Did you mean hints candidates equality

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87165

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Or in this case

xgcc: error: unrecognized command line option ‘-std=c++19’; valid options for
-std= include "c++11, c++14, c++17, c++1y, c++1z"

instead of "did you mean" if there's no clear winner.

[Bug middle-end/87162] [6.2.0] Internal compiler error: Error reporting routines re-entered.

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87162

Richard Biener  changed:

   What|Removed |Added

  Component|c   |middle-end

--- Comment #3 from Richard Biener  ---
Probably happens even with an empty CU since it ICEs in dump_pass_list.

[Bug c++/87161] if -Werror appear after -Wmissing-prototypes the warning is not turn into error

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87161

Richard Biener  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
 Ever confirmed|0   |1
  Known to fail||8.2.1

--- Comment #1 from Richard Biener  ---
Confirmed.  I think we shouldn't Werror for this kind of thing.

[Bug gcov-profile/83877] Make gcov accept a path to the gcda and a path to the gcno file

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83877

--- Comment #4 from Martin Liška  ---
I see your use case but as mentioned I don't want to do gcov over complex about
locations. Hope you can live with the symlink creation.

[Bug middle-end/87157] [9 regression] gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c fails starting with r263981

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87157

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
  Component|testsuite   |middle-end
   Target Milestone|--- |9.0

[Bug target/87156] [9 Regression] ICE building libstdc++ for mips64

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87156

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |9.0

[Bug target/87164] ICE in output_1236, at config/rs6000/vsx.md:3236

2018-08-31 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87164

Segher Boessenkool  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
 Ever confirmed|0   |1

--- Comment #1 from Segher Boessenkool  ---
Confirmed.

[Bug target/87163] ICE in extract_insn, at recog.c:2305

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87163

--- Comment #1 from Martin Liška  ---
/usr/bin/powerpc64le-suse-linux-as --version
GNU assembler (GNU Binutils; openSUSE Tumbleweed) 2.31
Copyright (C) 2018 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `powerpc64le-suse-linux'.

[Bug target/87160] Maybe miscompilation of a polyhedron test

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87160

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Martin Liška  ---
Issue is as simple as missing ulimit -s unlimited.

[Bug target/87164] ICE in output_1236, at config/rs6000/vsx.md:3236

2018-08-31 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87164

--- Comment #2 from Segher Boessenkool  ---
Caused by r263614.

[Bug target/87164] ICE in output_1236, at config/rs6000/vsx.md:3236

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87164

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #3 from Martin Liška  ---
Then mine.

[Bug tree-optimization/87166] New: 454.calculix benchmark is much slower on -Ofast with PGO or LTO

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87166

Bug ID: 87166
   Summary: 454.calculix benchmark is much slower on -Ofast with
PGO or LTO
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: jamborm at gcc dot gnu.org
Blocks: 26163
  Target Milestone: ---
  Host: x86_64-linux-gnu

Seen on multiple GCC releases and different CPUs (Intel Haswell and AMD Zen).
For PGO it goes from 197.860 to 455.025 seconds.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

[Bug tree-optimization/87166] 454.calculix benchmark is much slower on -Ofast with PGO or LTO

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87166

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
I hope I found the root cause:

perf report
-Ofast:

# Overhead  Command  Shared Object Symbol   
#   ...   

#
44.48%  calculix_peak.a  calculix_peak.amd64-m64-mine  [.] e_c3d_
18.77%  calculix_peak.a  calculix_peak.amd64-m64-mine  [.] DVdot33
 6.82%  calculix_peak.a  calculix_peak.amd64-m64-mine  [.]
Network_findAugmentingPath

-Ofast with PGO:

# Overhead  Command  Shared Object Symbol   
#   ...   

#
75.30%  calculix_peak.a  calculix_peak.amd64-m64-mine  [.] e_c3d_.cold.0
 7.53%  calculix_peak.a  calculix_peak.amd64-m64-mine  [.] DVdot33
 2.58%  calculix_peak.a  calculix_peak.amd64-m64-mine  [.]
Network_findAugmentingPath
 1.63%  calculix_peak.a  calculix_peak.amd64-m64-mine  [.] nident_

So part of the function is put into cold text section. Reason is that train and
reference run
have totally different coverage. The most hottest code in ref run is never
executed in train run:

e_c3d.f.gcov:

TRAIN run:

#:  591:   sm(ii1+2,jj1+2)=sm(ii1,jj1)
-:  592:endif
-:  593:!
-:  594: else
-:  595:!
-:  596:! buckling matrix  
-:  597:!
-:  598:senergyb=
-:  599: &   (s11b*w(1,1)+s12b*(w(1,2)+w(2,1))
-:  600: &   +s13b*(w(1,3)+w(3,1))+s22b*w(2,2)
#:  601: &  
+s23b*(w(2,3)+w(3,2))+s33b*w(3,3))*weight
#:  602:sm(ii1,jj1)=sm(ii1,jj1)-senergyb
#:  603:   
sm(ii1+1,jj1+1)=sm(ii1+1,jj1+1)-senergyb
#:  604:   
sm(ii1+2,jj1+2)=sm(ii1+2,jj1+2)-senergyb
-:  605:!
-:  606: endif
-:  607:!
   5M:  608: ii1=ii1+3
-:  609:  enddo
 449k:  610:  jj1=jj1+3
-:  611:   enddo
-:  612:else
-:  613:!
-:  614:!   stiffness matrix for static and modal
-:  615:!   2nd order calculations
-:  616:!
-:  617:!   large displacement stiffness
-:  618:!   
#:  619:   do i1=1,3
#:  620:  do j1=1,3
#:  621: vo(i1,j1)=0.d0
#:  622: do k1=1,nope
#:  623:   
vo(i1,j1)=vo(i1,j1)+shp(j1,k1)*voldl(i1,k1)
-:  624: enddo
-:  625:  enddo
-:  626:   enddo
-:  627:!
#:  628:   if(mattyp.eq.1) then
#:  629:  call wcoef(v,vo,al,um)
-:  630:   endif
-:  631:!
-:  632:!   calculating the total mass of the element for
-:  633:!   lumping purposes: only for explicit nonlinear
-:  634:!   dynamic calculations
-:  635:!
#:  636:   if(mass.and.(iexpl.eq.1)) then
#:  637:  summass=summass+rho*xsj
-:  638:   endif
-:  639:!
#:  640:   jj1=1
#:  641:   do jj=1,nope
-:  642:!
#:  643:  ii1=1
#:  644:  do ii=1,jj
-:  645:!
-:  646:!   all products of the shape functions for a
given ii
-:  647:!   and jj
-:  648:!
#:  649: do i1=1,3
#:  650:do j1=1,3
#:  651:   w(i1,j1)=shpj(i1,ii)*shpj(j1,jj)
-:  652:enddo
-:  653: enddo
-:  654:!
#:  655: if(mattyp.eq.1) then
-:  656:!
#:  657:do m1=1,3
#:  658:   do m2=1,3
#:  659:  do m3=1,3
#:  660: do m4=1,3
-:  661:s(ii1+m2-1,jj1+m1-1)=
-:  662: &   s(ii1+m2-1,jj1+m1-1)

[Bug tree-optimization/87166] 454.calculix benchmark is much slower on -Ofast with PGO or LTO

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87166

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Martin Liška  ---
As agreed on with Martin Jambor on IRC, let's close it as won't fix.

[Bug middle-end/26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
Bug 26163 depends on bug 87166, which changed state.

Bug 87166 Summary: 454.calculix benchmark is much slower on -Ofast with PGO or 
LTO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87166

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

[Bug driver/87161] if -Werror appear after -Wmissing-prototypes the warning is not turn into error

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87161

Jonathan Wakely  changed:

   What|Removed |Added

  Component|c++ |driver

--- Comment #2 from Jonathan Wakely  ---
This isn't specific to -Wmissing-prototypes or to C++, it happens for any
option that isn't valid for the current language e.g.

g++ -Werror  -Wduplicate-decl-specifier ...

gcc -Werror -Wc++14-compat ...


The behaviour is fairly intuitive. While processing the command-line arguments
if an unknown/invalid option is encountered there is a warning. After -Werror
has been seen, all warnings are errors (including warnings about
unknown/invalid options).

[Bug libstdc++/78179] FAIL: 26_numerics/headers/cmath/hypot.cc execution test

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78179

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
 Ever confirmed|0   |1

[Bug middle-end/46935] We should recognize expanded switch statement and convert 2 way switch statements into shift & mask test

2018-08-31 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=46935

--- Comment #7 from Eric Gallager  ---
(In reply to Tom de Vries from comment #5)
> > I know Tom de Vries is working on this problem and has a prototype patch.
> > He'll be posting his work for 4.7.
> 
> http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00959.html

Does it still apply for gcc 9?

[Bug driver/87161] if -Werror appear after -Wmissing-prototypes the warning is not turn into error

2018-08-31 Thread niraizik at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87161

--- Comment #3 from Nir Aizik  ---
I think what make it counter-intuitive is that warning from valid option the
order of Werror is not important

example:
g++ -c -Wunused-variable -Werror test.cpp -o test.o
test.cpp: In function ‘int main(int, char**)’:
test.cpp:4:7: error: unused variable ‘i’ [-Werror=unused-variable]
   int i;
   ^
cc1plus: all warnings being treated as errors


g++ -c -Werror -Wunused-variable test.cpp -o test.o
test.cpp: In function ‘int main(int, char**)’:
test.cpp:4:7: error: unused variable ‘i’ [-Werror=unused-variable]
   int i;
   ^
cc1plus: all warnings being treated as errors


Another thing that is troubling is when there is 2 Werror, before and after, it
will output only warning

g++ -c -Werror -Wmissing-prototypes -Werror test.cpp -o test.o
cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for
C/ObjC but not for C++

[Bug libstdc++/78179] FAIL: 26_numerics/headers/cmath/hypot.cc execution test

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78179

--- Comment #2 from Jonathan Wakely  ---
We already disable it rather liberally on AIX:

// { dg-xfail-run-if "AIX long double" { powerpc-ibm-aix* } }

Maybe we should split the long double parts into a separate file and just xfail
that on affected targets, so the rest of the file runs everywhere.

[Bug tree-optimization/87167] New: strlen of stack-allocated zero-length array misoptimized in GCC 8

2018-08-31 Thread matti.niemenmaa+gccbugs at iki dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87167

Bug ID: 87167
   Summary: strlen of stack-allocated zero-length array
misoptimized in GCC 8
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: matti.niemenmaa+gccbugs at iki dot fi
  Target Milestone: ---

Created attachment 44636
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44636&action=edit
Preprocessed source

Unpreprocessed source code for illustration, reduced from UADE 2.13 (Unix Amiga
Delitracker Emulator):


#include 
#include 

struct uade_msg {
  int x;
  char data[0];
} __attribute__((packed));

int main(void) {
  char commandbuf[4096] = {0};
  struct uade_msg *um = (struct uade_msg *)commandbuf;
  strcpy(um->data, "foobar");
  printf("%s has strlen %zu\n", um->data, strlen((const char *)um->data));
  printf("%s has strlen %zu\n", um->data, strlen((const char *)um->data));
}


When compiled with -O2 -fno-strict-aliasing on GCC 8.2.0, the output of the
resulting program on my x86-64 machine is:

foobar has strlen 6
foobar has strlen 0

GCC 7.3.1 and 5.4.1 show a strlen of 6 on both output lines. (As does clang
6.0.1, for what it's worth.)

Looking at a snippet of the assembly, around the printf calls:

movl$6, %edx
leaq.LC0(%rip), %rdi
movl$1651470182, 4(%rsp)
callprintf@PLT
xorl%edx, %edx
xorl%eax, %eax
movq%rbx, %rsi
leaq.LC0(%rip), %rdi
callprintf@PLT

It looks like GCC 8.2.0 has optimized away both strlen calls, but replaced each
with a different value. Based on a cursory inspection, GCC 7.3.1 and 5.4.1
optimize away the first strlen call and inline the second (and clang 6.0.1
doesn't do anything to the first but re-uses the result instead of doing
another call).

Replacing the `char data[0]` with `char data[]` seems to cause GCC 8.2.0 to
behave the same way as 7.3.1 and 5.4.1, resulting in an output of 6 on both
lines. Using calloc instead of the stack allocation does the same.

It's been a while since I had to worry about the aliasing rules in C so I'm not
entirely sure whether this is code is invalid or not, but regardless, I would
expect to always see a result of 6 here with -fno-strict-aliasing.


Full output from gcc uade.c -O2 -fno-strict-aliasing -Wall -Wextra -v
-save-temps:

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --enable-libmpx --with-system-zlib --with-isl
--enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu
--disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object
--enable-linker-build-id --enable-lto --enable-plugin
--enable-install-libiberty --with-linker-hash-style=gnu
--enable-gnu-indirect-function --enable-multilib --disable-werror
--enable-checking=release --enable-default-pie --enable-default-ssp
--enable-cet=auto
Thread model: posix
gcc version 8.2.0 (GCC)
COLLECT_GCC_OPTIONS='-O2' '-fno-strict-aliasing' '-Wall' '-Wextra' '-v'
'-save-temps' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/cc1 -E -quiet -v uade.c -mtune=generic
-march=x86-64 -Wall -Wextra -fno-strict-aliasing -O2 -fpch-preprocess -o uade.i
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include
 /usr/local/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-O2' '-fno-strict-aliasing' '-Wall' '-Wextra' '-v'
'-save-temps' '-mtune=generic' '-march=x86-64'
 /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/cc1 -fpreprocessed uade.i -quiet
-dumpbase uade.c -mtune=generic -march=x86-64 -auxbase uade -O2 -Wall -Wextra
-version -fno-strict-aliasing -o uade.s
GNU C17 (GCC) version 8.2.0 (x86_64-pc-linux-gnu)
compiled by GNU C version 8.2.0, GMP version 6.1.2, MPFR version 4.0.1,
MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C17 (GCC) version 8.2.0 (x86_64-pc-linux-gnu)
compiled by GNU C version 8.2.0, GMP version 6.1.2, MPFR version 4.0.1,
MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 374c644ab4db4fa02e30fa5669d43e86
COLLECT_GCC_OPTIONS='-O2' '-fno-strict-aliasing' '-Wall' '

[Bug driver/87161] if -Werror appear after -Wmissing-prototypes the warning is not turn into error

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87161

--- Comment #4 from Jonathan Wakely  ---
(In reply to Nir Aizik from comment #3)
> I think what make it counter-intuitive is that warning from valid option the
> order of Werror is not important

Warnings from the code can't be emitted until compilation starts, and all
options have to be processed before that starts. The -Werror has already been
seen before compilation starts, so warnings have been turned into errors by the
time compiler warnings are emitted.

> Another thing that is troubling is when there is 2 Werror, before and after,
> it will output only warning
> 
> g++ -c -Werror -Wmissing-prototypes -Werror test.cpp -o test.o
> cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for
> C/ObjC but not for C++

That's weird, yes. I think when there are duplicates only the last one has an
effect, and so the first one (before the invalid -Wmissing-prototypes) is
ignored.

[Bug driver/87161] if -Werror appear after -Wmissing-prototypes the warning is not turn into error

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87161

--- Comment #5 from Jonathan Wakely  ---
This would all be solved if invalid warning options were never errors, as Richi
suggested.

Otherwise I think there would need to be a first pass of the options to look
for -Werror and then do a second pass, at which point -Werror would be active.

[Bug c++/80916] [6/7/8/9 Regression] Spurious "declared 'static' but never defined" warning

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80916

Jonathan Wakely  changed:

   What|Removed |Added

   Last reconfirmed|2017-11-27 00:00:00 |2018-8-31
 CC||aldyh at gcc dot gnu.org
  Known to work||5.5.0
Summary|Spurious "declared 'static' |[6/7/8/9 Regression]
   |but never defined" warning  |Spurious "declared 'static'
   ||but never defined" warning
  Known to fail|8.0 |6.4.0, 8.2.0, 9.0

--- Comment #4 from Jonathan Wakely  ---
The warning started with r224161

Merge debug-early branch into mainline.

[Bug tree-optimization/87167] strlen of stack-allocated zero-length array misoptimized in GCC 8

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87167

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
  Known to work||8.2.1
 Resolution|--- |FIXED

--- Comment #1 from Richard Biener  ---
Confirmed.  Seems to be fixed on trunk and the branch head.

[Bug tree-optimization/87167] strlen of stack-allocated zero-length array misoptimized in GCC 8

2018-08-31 Thread matti.niemenmaa+gccbugs at iki dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87167

--- Comment #2 from Matti Niemenmaa  ---
Thanks for the info. I peeked at the git log and came across PR86914 — this
looks like a duplicate of that. Sorry for not managing to find it in Bugzilla
earlier.

[Bug tree-optimization/87168] New: ICE on valid code at -Os and above on x86_64-linux-gnu: verify_ssa failed

2018-08-31 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87168

Bug ID: 87168
   Summary: ICE on valid code at -Os and above on
x86_64-linux-gnu: verify_ssa failed
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

It is a recent regression. 

$ gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 9.0.0 20180830 (experimental) [trunk revision 263982] (GCC)
$
$ gcctk -O1 small.c
$ gcc-8.1.0 -Os small.c
$
$ gcctk -Os small.c
small.c: In function ‘main’:
small.c:3:5: error: definition in block 8 does not dominate use in block 7
3 | int main ()
  | ^~~~
for SSA_NAME: j_27 in statement:
i_20 = (unsigned int) j_27;
during GIMPLE pass: cunrolli
small.c:3:5: internal compiler error: verify_ssa failed
0xefaca3 verify_ssa(bool, bool)
../../gcc-source-trunk/gcc/tree-ssa.c:1188
0xbb2653 execute_function_todo
../../gcc-source-trunk/gcc/passes.c:1950
0xbb2f79 execute_todo
../../gcc-source-trunk/gcc/passes.c:1997
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
$


---


int a, b, c, d, e, f, *g;

int main ()
{ 
  unsigned i;
  while (b)
{ 
  int j, m;
L1:
  f = j;
L2:
  if (i && e)
  { 
i = f;
goto L2;
  }
  j = f;
  if (a)
goto L3;
  for (m = 0; m < 2; m++)
if (d)
  goto L1;
  goto L2;
L3:
  (&j != g) | c;
}
  return 0;
}

[Bug c++/84707] [8 Regression] internal compiler error: Segmentation fault (tree_check()/duplicate_decls())

2018-08-31 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84707

--- Comment #9 from Nathan Sidwell  ---
Author: nathan
Date: Fri Aug 31 12:38:00 2018
New Revision: 264016

URL: https://gcc.gnu.org/viewcvs?rev=264016&root=gcc&view=rev
Log:
[PR c++/87155] Anonymous namespace and

https://gcc.gnu.org/ml/gcc-patches/2018-08/msg02031.html
PR c++/87155
PR c++/84707
cp/
* name-lookup.c (name_lookup::search_namespace): Don't look at
inlines when searching for NULL names.
testsuite/
* g++.dg/cpp0x/pr87155.C: New.
* g++.dg/cpp0x/inline-ns10.C: Adjust.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/pr87155.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/inline-ns10.C

[Bug c++/87155] [8/9 Regression] unnamed namespace redeclaration error when inline namespace is present

2018-08-31 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87155

--- Comment #5 from Nathan Sidwell  ---
Author: nathan
Date: Fri Aug 31 12:38:00 2018
New Revision: 264016

URL: https://gcc.gnu.org/viewcvs?rev=264016&root=gcc&view=rev
Log:
[PR c++/87155] Anonymous namespace and

https://gcc.gnu.org/ml/gcc-patches/2018-08/msg02031.html
PR c++/87155
PR c++/84707
cp/
* name-lookup.c (name_lookup::search_namespace): Don't look at
inlines when searching for NULL names.
testsuite/
* g++.dg/cpp0x/pr87155.C: New.
* g++.dg/cpp0x/inline-ns10.C: Adjust.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/pr87155.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/name-lookup.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/cpp0x/inline-ns10.C

[Bug c++/87155] [8/9 Regression] unnamed namespace redeclaration error when inline namespace is present

2018-08-31 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87155

--- Comment #6 from Nathan Sidwell  ---
Fixed trunk r264016.

[Bug c++/86898] [9 regression] g++.old-deja/g++.mike/p784.C FAILs

2018-08-31 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86898

Rainer Orth  changed:

   What|Removed |Added

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

--- Comment #1 from Rainer Orth  ---
The failures vanished again after r263444.

[Bug target/86744] gcc.target/i386/addr-sel-1.c XPASSes on 32-bit x86

2018-08-31 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86744

Rainer Orth  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
 CC||ubizjak at gmail dot com
 Ever confirmed|0   |1

--- Comment #1 from Rainer Orth  ---
This issue still exists as of r264006.

[Bug tree-optimization/87168] [9 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: verify_ssa failed

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87168

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2018-08-31
Version|unknown |9.0
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
   Target Milestone|--- |9.0
Summary|ICE on valid code at -Os|[9 Regression] ICE on valid
   |and above on|code at -Os and above on
   |x86_64-linux-gnu:   |x86_64-linux-gnu:
   |verify_ssa failed   |verify_ssa failed
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed, likely mine.

[Bug target/86744] gcc.target/i386/addr-sel-1.c XPASSes on 32-bit x86

2018-08-31 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86744

--- Comment #2 from Uroš Bizjak  ---
Just remove XPASS.

Ideally, this test should also work for 64bit targets (PR 87055).

[Bug target/86744] gcc.target/i386/addr-sel-1.c XPASSes on 32-bit x86

2018-08-31 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86744

--- Comment #3 from Uroš Bizjak  ---
(In reply to Uroš Bizjak from comment #2)
> Just remove XPASS.
Eh, XFAIL from the test.

[Bug c++/87155] [8/9 Regression] unnamed namespace redeclaration error when inline namespace is present

2018-08-31 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87155

--- Comment #8 from Nathan Sidwell  ---
Author: nathan
Date: Fri Aug 31 12:57:45 2018
New Revision: 264017

URL: https://gcc.gnu.org/viewcvs?rev=264017&root=gcc&view=rev
Log:
[PR c++/87155] Anonymous namespace and

https://gcc.gnu.org/ml/gcc-patches/2018-08/msg02031.html
PR c++/87155
PR c++/84707
cp/
* name-lookup.c (name_lookup::search_namespace): Don't look at
inlines when searching for NULL names.
testsuite/
* g++.dg/cpp0x/pr87155.C: New.
* g++.dg/cpp0x/inline-ns10.C: Adjust.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/pr87155.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/name-lookup.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/inline-ns10.C

[Bug c++/87155] [8/9 Regression] unnamed namespace redeclaration error when inline namespace is present

2018-08-31 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87155

Nathan Sidwell  changed:

   What|Removed |Added

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

--- Comment #7 from Nathan Sidwell  ---
Fixed gcc-8 r264017.

[Bug c++/84707] [8 Regression] internal compiler error: Segmentation fault (tree_check()/duplicate_decls())

2018-08-31 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84707

--- Comment #10 from Nathan Sidwell  ---
Author: nathan
Date: Fri Aug 31 12:57:45 2018
New Revision: 264017

URL: https://gcc.gnu.org/viewcvs?rev=264017&root=gcc&view=rev
Log:
[PR c++/87155] Anonymous namespace and

https://gcc.gnu.org/ml/gcc-patches/2018-08/msg02031.html
PR c++/87155
PR c++/84707
cp/
* name-lookup.c (name_lookup::search_namespace): Don't look at
inlines when searching for NULL names.
testsuite/
* g++.dg/cpp0x/pr87155.C: New.
* g++.dg/cpp0x/inline-ns10.C: Adjust.

Added:
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/pr87155.C
Modified:
branches/gcc-8-branch/gcc/cp/ChangeLog
branches/gcc-8-branch/gcc/cp/name-lookup.c
branches/gcc-8-branch/gcc/testsuite/ChangeLog
branches/gcc-8-branch/gcc/testsuite/g++.dg/cpp0x/inline-ns10.C

[Bug c++/84707] [8 Regression] internal compiler error: Segmentation fault (tree_check()/duplicate_decls())

2018-08-31 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84707

Nathan Sidwell  changed:

   What|Removed |Added

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

--- Comment #11 from Nathan Sidwell  ---
Fixed trunk & gcc8

[Bug tree-optimization/87168] [9 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: verify_ssa failed

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87168

--- Comment #2 from Richard Biener  ---
It shows a few things, first, SSA names defined before the value-numbered
region are not considered "available".  So for

 _1 = ...;

region_begin:
 _2 = _1;
 _3 = _2;

we'd not optimize to

 _2 = _1;
 _3 = _1;

then it shows, that

5093/* Look for sth available at the definition block of the
argument.
5094   This avoids inconsistencies between availability there which
5095   decides if the stmt can be removed and availability at the
5096   use site.  The SSA property ensures that things available
5097   at the definition are also available at uses.  */

computes bogus availability when the above isn't handled correctly (or we
make things available at places where there's dominating stuff available).

[Bug tree-optimization/87169] New: ICE on valid code at -Os and above on x86_64-linux-gnu: Segmentation fault

2018-08-31 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87169

Bug ID: 87169
   Summary: ICE on valid code at -Os and above on
x86_64-linux-gnu: Segmentation fault
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

It is a recent regression. 

$ gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/home/su/software/tmp/gcc/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/home/su/software/tmp/gcc/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 9.0.0 20180830 (experimental) [trunk revision 263982] (GCC)
$
$ gcctk -O1 small.c
$ gcc-8.1.0 -Os small.c
$
$ gcctk -Os small.c
during GIMPLE pass: fre
small.c: In function 'main':
small.c:38:1: internal compiler error: Segmentation fault
38 | }
   | ^
0xc7544f crash_signal
../../gcc-source-trunk/gcc/toplev.c:325
0x985fb4 is_gimple_val(tree_node*)
../../gcc-source-trunk/gcc/gimple-expr.c:789
0xcbbb9f verify_gimple_assign_binary
../../gcc-source-trunk/gcc/tree-cfg.c:3785
0xcbcdd7 verify_gimple_assign
../../gcc-source-trunk/gcc/tree-cfg.c:4620
0xcbcdd7 verify_gimple_stmt
../../gcc-source-trunk/gcc/tree-cfg.c:4882
0xcca931 verify_gimple_in_cfg(function*, bool)
../../gcc-source-trunk/gcc/tree-cfg.c:5360
0xb80f77 execute_function_todo
../../gcc-source-trunk/gcc/passes.c:1943
0xb818a9 execute_todo
../../gcc-source-trunk/gcc/passes.c:1997
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
$


-


int a, b, c;

int main ()
{ 
  int d;
  b = 1;
L1:
  for (; b > 1;)
goto L2;
  { 
int e[1];
  L3:;
  }
L2:
  while (a)
{ 
  d--;
  goto L1;
}
  while (c)
{ 
  if (a)
goto L3;
  if (a)
break;
  if (a)
goto L2;
  while (c)
while (c)
  while (c)
while (c)
  while (c)
while (c)
  while (c)
;
}
  return 0;
}

[Bug tree-optimization/86850] ubsan: runtime error: member call on null pointer

2018-08-31 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86850

--- Comment #4 from David Binderman  ---
I tried out your suggestion and got this:

$ ~/gcc/results.264011.dcb.ubsan/bin/gcc -c -O3 -std=c89 -w bug453.c
during GIMPLE pass: slp
src/rate.c: In function ‘od_enc_rc_reset’:
src/rate.c:365:13: internal compiler error: in vect_build_slp_tree_2, at
tree-vect-slp.c:1492
0x676275 vect_build_slp_tree_2
../../trunk/gcc/tree-vect-slp.c:1492
0x2c3a7d6 vect_build_slp_tree
../../trunk/gcc/tree-vect-slp.c:1105
0x2c3e793 vect_build_slp_tree_2
../../trunk/gcc/tree-vect-slp.c:1257
0x2c3a7d6 vect_build_slp_tree
../../trunk/gcc/tree-vect-slp.c:1105

I used revision 264011 as a baseline.

[Bug c++/43105] Document restrictions on mixing -fno-rtti and -frtti

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43105

--- Comment #3 from Jonathan Wakely  ---
(In reply to Jeffrey Yasskin from comment #0)
> programs don't link when a -frtti class is derived from a -fno-rtti base
> class.

It's more complicated than that. The ABI defines when RTTI is emitted:
https://itanium-cxx-abi.github.io/cxx-abi/abi.html#vague-rtti

There's only a problem when compiling a key function with -fno-rtti, and other
translation units compiled with -frtti have no way to know how the key function
was compiled.

For example, given:

struct A {
  A();
  ~A();
};

struct B {
  B();
  virtual ~B() { }
};

struct C {
  C();
  virtual ~C();
};

A and B can always be derived from unconditionally. If C::~C() is compiled with
-fno-rtti then classes that derive from C must also use -fno-rtti to compile
their key function (and if they don't have a key function, then all uses of C
that need a definition must be compiled with -fno-rtti).

I don't think this can be fixed. Documenting it is non-trivial.

I went to see what Clang does, and I can't even find -frtti / -fno-rtti in the
manual, so we're doing better than that!

[Bug c++/87108] Template partial specialization is ignored

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87108

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
I think there's an existing bug report about this. The problem is here:

template
struct scale> {

The template parameter for amount needs to be type 'int' not 'size_t'.
amount should still work though, because Original should be converted
to int, and so match amount<1>.

[Bug c++/87108] Template partial specialization is ignored

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87108

Jonathan Wakely  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=83426

--- Comment #2 from Jonathan Wakely  ---
Looks like PR 83426 and PR 60679 are both the same issue as this.

[Bug c++/87108] Template partial specialization is ignored

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87108

Jonathan Wakely  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=77435

--- Comment #3 from Jonathan Wakely  ---
And maybe PR 77435

[Bug ada/87170] New: compiler complains about not referenced character literals if they are only used in string literals

2018-08-31 Thread ievgenii.meshcheriakov at here dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87170

Bug ID: 87170
   Summary: compiler complains about not referenced character
literals if they are only used in string literals
   Product: gcc
   Version: 8.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ievgenii.meshcheriakov at here dot com
  Target Milestone: ---

Created attachment 44637
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44637&action=edit
Example file demonstrating the bug

Gnat generates warnings about unused character literals when they are only used
in string literal like demonstrated in the attached simplified example.

The type Bit values are only used inside definition of Bits. The compiler
generates the following warnings:

  % gnatchop bug.ada
  splitting bug.ada into:
 bug.ads
 bug.adb
  % gnatmake -gnatwa bug.adb
  x86_64-linux-gnu-gcc-8 -c -gnatwa bug.adb
  bug.adb:3:17: warning: literal "'0'" is not referenced
  bug.adb:3:22: warning: literal "'1'" is not referenced

While values of Bit are not used directly they are still used in the definition
of Bits, so the warning should not be generated.

The warning is not generated when definitions are changed as follows:

  type Bit is (Zero, One);
  ...
  constant Bits : constant Bit_Array := (Zero, One);

[Bug target/87104] missed &, == optimization makes Emacs ~0.4% slower on x86-64

2018-08-31 Thread tromey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87104

--- Comment #13 from Tom Tromey  ---
(In reply to pipcet from comment #12)

> So I think the performance difference is really significant for Emacs; my
> plan is to test all three versions on other programs, make sure the code
> works for C bitfields, and then submit it for inclusion. Is that okay?

Just as a process comment, you're not too likely to get an answer to this
sort of question; instead just go ahead and send the patch and see what
the responses are.

Thanks for looking into this.

[Bug c++/77435] Dependent reference non-type template parameter not matched for partial specialization

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77435

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
   Target Milestone|--- |7.2
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
This was fixed on trunk by r249320 for PR 81102 (and also fixed for 7.2).

It doesn't look like a dup, so we should add the testcase before closing this.

[Bug libstdc++/87106] Group move and destruction of the source, where possible, for speed

2018-08-31 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87106

--- Comment #1 from Marc Glisse  ---
Created attachment 44638
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44638&action=edit
proof of concept patch (diff -w)

Trying to get an idea of how things could look like. I know
is_trivially_move_constructible is not officially the right test to be allowed
to use memmove, that's a detail that can easily be changed.

[Bug tree-optimization/87168] [9 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: verify_ssa failed

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87168

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #3 from Martin Liška  ---
Started with r263875.

[Bug tree-optimization/86914] [8 Regression] -O2 generates wrong code with strlen() of pointers within one-element arrays of structures

2018-08-31 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86914

Martin Sebor  changed:

   What|Removed |Added

 CC||matti.niemenmaa+gccbugs@iki
   ||.fi

--- Comment #9 from Martin Sebor  ---
*** Bug 87167 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/87169] [9 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: Segmentation fault

2018-08-31 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87169

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
 CC||rguenth at gcc dot gnu.org
Version|unknown |9.0
   Target Milestone|--- |9.0
Summary|ICE on valid code at -Os|[9 Regression] ICE on valid
   |and above on|code at -Os and above on
   |x86_64-linux-gnu:   |x86_64-linux-gnu:
   |Segmentation fault  |Segmentation fault
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Also started with r263875.

[Bug tree-optimization/87167] strlen of stack-allocated zero-length array misoptimized in GCC 8

2018-08-31 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87167

Martin Sebor  changed:

   What|Removed |Added

   Keywords||wrong-code
 CC||msebor at gcc dot gnu.org
 Resolution|FIXED   |DUPLICATE

--- Comment #3 from Martin Sebor  ---
Yes, I believe this is a duplicate of pr86914.

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

[Bug c/87171] New: -march=native doesn't detect flags correctly on G4560

2018-08-31 Thread luz at mujerlibre dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87171

Bug ID: 87171
   Summary: -march=native doesn't detect flags correctly on G4560
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: luz at mujerlibre dot net
  Target Milestone: ---

-march=native on G4560 disables certain flags that appear in /proc/cpuinfo and
are enabled with -march=goldmont. The goldmont builds run fine so it appears
that those flags should be enabled with -march=native.

-march=native:
  -mxsave   [disabled]
  -mxsavec  [disabled]
  -mxsaveopt[disabled]
  -mxsaves  [disabled]

-march=goldmont:
  -mxsave   [enabled]
  -mxsavec  [enabled]
  -mxsaveopt[enabled]
  -mxsaves  [enabled]

/proc/cpuinfo:
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush
dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm
constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc
cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2
ssse3 sdbg cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt
tsc_deadline_timer aes xsave rdrand lahf_lm abm 3dnowprefetch cpuid_fault
invpcid_single pti tpr_shadow vnmi flexpriority ept vpid fsgsbase tsc_adjust
smep erms invpcid mpx rdseed smap clflushopt intel_pt xsaveopt xsavec xgetbv1
xsaves dtherm arat pln pts hwp hwp_notify hwp_act_window hwp_epp

[Bug libstdc++/77691] [7/8/9 regression] experimental/memory_resource/resource_adaptor.cc FAILs

2018-08-31 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77691

Rainer Orth  changed:

   What|Removed |Added

 CC||redi at gcc dot gnu.org

--- Comment #22 from Rainer Orth  ---
While debugging what could be memory corruption as reported in PR
bootstrap/87134,
I found another related issue: when I preload libumem.so (an alternative
debugging allocator library), two new failures occur:

+FAIL: experimental/memory_resource/new_delete_resource.cc execution test

/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/memory_resource/new_delete_resource.cc:117:
void test03(): Assertion 'aligned(p)' failed.

+FAIL: experimental/memory_resource/resource_adaptor.cc execution test

/vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/memory_resource/resource_adaptor.cc:136:
void test05(): Assertion 'aligned(p)' failed.

this time for the 64-bit test only.  I find that malloc(1) returns 8-byte
aligned storage, while alignof(max_align_t) is 16.

Reading https://github.com/jemalloc/jemalloc/issues/1072 suggests that this
might
be in accordance with C11.

[Bug fortran/87172] New: [9 Regression] Spurious "Derived type 'c_funptr' at (1) has not been declared" error after r263782

2018-08-31 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87172

Bug ID: 87172
   Summary: [9 Regression] Spurious "Derived type 'c_funptr' at
(1) has not been declared" error after r263782
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dominiq at lps dot ens.fr
  Target Milestone: ---

Up to revision r263781, gfortran compiles the following test (pr71764 comment
3)

module sqlite3_primitive
   use iso_c_binding, only: c_funptr
end module sqlite3_primitive

module fsqlite_runtime

  use sqlite3_primitive

  use, intrinsic :: iso_c_binding, only : c_null_funptr, c_funptr

  implicit none

   contains

  subroutine fsqlite_exec
 type(c_funptr) to_cb 
 to_cb = c_null_funptr 
  end subroutine

end module

Starting at r263782, I get the error

pr71764_1.f90:7:6:

7 |   use sqlite3_primitive
  |  1
Error: Derived type 'c_funptr' at (1) has not been declared

Is this expected? If no, I’ll file a new PR. If yes, why (the error message is
quite confusing)? 

I also get the same error with the first test in pr71764 comment 4, but not
with the other variants.

[Bug fortran/87172] [9 Regression] Spurious "Derived type 'c_funptr' at (1) has not been declared" error after r263782

2018-08-31 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87172

Dominique d'Humieres  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |ASSIGNED
  Known to work||8.2.0
   Keywords||rejects-valid
   Last reconfirmed||2018-08-31
   Assignee|unassigned at gcc dot gnu.org  |janus at gcc dot gnu.org
 Ever confirmed|0   |1
   Target Milestone|--- |9.0
  Known to fail||9.0

[Bug libstdc++/77691] [7/8/9 regression] experimental/memory_resource/resource_adaptor.cc FAILs

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77691

--- Comment #23 from Jonathan Wakely  ---
Reasonable people have different opinions on whether that's valid. But since
they're unlikely to change, I need to accept that with some implementations,
malloc(n) is aligned to min(n, alignof(max_align_t)).

[Bug c++/84075] Template parameter not resolved: invalid application of ‘sizeof’ to incomplete type ‘boost::serialization::U’

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84075

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords|needs-reduction |
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Confirmed. I'll update a creduce'd testcase shortly.

[Bug preprocessor/42921] No error with missing header and -MM

2018-08-31 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42921

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2018-08-31
 Ever confirmed|0   |1

[Bug tree-optimization/87168] [9 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: verify_ssa failed

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87168

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/87168] [9 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: verify_ssa failed

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87168

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Fri Aug 31 16:50:13 2018
New Revision: 264021

URL: https://gcc.gnu.org/viewcvs?rev=264021&root=gcc&view=rev
Log:
2018-08-31  Richard Biener  

PR tree-optimization/87168
* tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
(rpo_elim::eliminate_avail): When OP was not visited it must
be available.

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

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

[Bug tree-optimization/87169] [9 Regression] ICE on valid code at -Os and above on x86_64-linux-gnu: Segmentation fault

2018-08-31 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87169

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Biener  ---
Mine as well then.  Confirmed even with the last fix.

We're doing

Replaced redundant PHI node defining d_14 with d_20(D)
...
Removing dead stmt d_14 = PHI 

but the LHS d_14 is still used...

Block 19: BB6 found not executable

that's the block with said stmt - so we fail to eliminate it.  That's because
the block is reachable via the irreducible region but we marked the block
as not need iterating.

Ah, this is caused by the loop depth limiting, adjusting --param
rpo-vn-max-loop-depth helps.

Will investigate early next week.

[Bug c++/87136] internal compiler error: in emit_move_insn, at expr.c:3722

2018-08-31 Thread darko.veberic at ijs dot si
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87136

--- Comment #4 from Darko Veberic  ---
after 3 days of running the delta managed to bring down the .ii file from 4.5MB
to 1.4MB but it then failed with error message

Died at ~/soft/delta/trunk/delta line 123, <> line 104113.

[Bug fortran/87172] [9 Regression] Spurious "Derived type 'c_funptr' at (1) has not been declared" error after r263782

2018-08-31 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87172

--- Comment #1 from janus at gcc dot gnu.org ---
Reduced test case:


module m1
   use iso_c_binding, only: c_funptr
end module

module m2
  use m1
  use iso_c_binding
end module

[Bug fortran/66575] Endless compilation on missing end interface

2018-08-31 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66575

Jerry DeLisle  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #7 from Jerry DeLisle  ---
Second case in comment one loops forever.

[Bug c++/87136] internal compiler error: in emit_move_insn, at expr.c:3722

2018-08-31 Thread darko.veberic at ijs dot si
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87136

--- Comment #5 from Darko Veberic  ---
fortunately enough, i could manually find a very short minimal example which
still contains the failure. to reproduce the internal compiler error one should
compile the example as

g++ -c minimal_example.cc

[Bug c++/87122] [8/9 Regression] ICE in tsubst_decomp_names

2018-08-31 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87122

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug c++/87136] internal compiler error: in emit_move_insn, at expr.c:3722

2018-08-31 Thread darko.veberic at ijs dot si
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87136

--- Comment #6 from Darko Veberic  ---
Created attachment 44639
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44639&action=edit
minimal example which contains the internal compiler error

minimal_example.cc:21:57: internal compiler error: in emit_move_insn, at
expr.c:3722
  return BiComplex{Interpolate(1.f, 0.f, 2.f, a.fA, b.fA),
std::complex()};
^

[Bug c++/87136] internal compiler error: in emit_move_insn, at expr.c:3722

2018-08-31 Thread darko.veberic at ijs dot si
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87136

--- Comment #7 from Darko Veberic  ---
i get the internal error with
g++ (Ubuntu 8-20180414-1ubuntu2) 8.0.1 20180414 (experimental) [trunk revision
259383] 
and
g++-7 (Ubuntu 7.3.0-16ubuntu3) 7.3.0

[Bug middle-end/87173] New: -Walloc-size-larger-than= silently fails for operands/size values larger than __SIZE_MAX__

2018-08-31 Thread jozef.l at mittosystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87173

Bug ID: 87173
   Summary: -Walloc-size-larger-than= silently fails for
operands/size values larger than __SIZE_MAX__
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jozef.l at mittosystems dot com
  Target Milestone: ---

Created attachment 44640
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44640&action=edit
testcase.c

Exposed by gcc.dg/Walloc-size-larger-than-{4,5,6,7}.c for msp430-elf, on
latest trunk.
- If the operand to the allocation function being checked is larger than
  __SIZE_MAX__, no warning is emitted.
- If the value passed to -Walloc-size-larger-than= is larger than or equal to
  __SIZE_MAX__, no warning is emitted.

e.g. for msp430-elf, where __SIZE_MAX__ is 65535. testcase.c attached.

> msp430-elf-gcc -O -ftrack-macro-expansion=0 -Walloc-size-larger-than=65534 
> testcase.c -S

> testcase.c: In function 'f':
> testcase.c:6:3: warning: argument 1 value '65535' exceeds maximum object size 
> 65534 [-Walloc-size-larger-than=]
> 6 |   T (__builtin_malloc (a));
>   |   ^
> testcase.c:6:3: note: in a call to built-in allocation function 
> '__builtin_malloc'

The expected warning for 65536 (__SIZE_MAX__ + 1) exceeding maximum object size
is missing.

Again, with __SIZE_MAX__ as the parameter to -Walloc-size-larger-than=

> msp430-elf-gcc -O -ftrack-macro-expansion=0 -Walloc-size-larger-than=65535 
> testcase.c -S

No warnings output.

[Bug middle-end/87173] -Walloc-size-larger-than= silently fails for operands/size values larger than __SIZE_MAX__

2018-08-31 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87173

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #1 from Jakub Jelinek  ---
malloc argument is size_t, not unsigned long and so malloc is called in that
case (assuming unsigned long is wider than size_t) with argument 0, not 65536,
so there is nothing to warn about.

[Bug c++/87174] New: virt-specifier not recognized on function declared like a variable

2018-08-31 Thread blitzrakete at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87174

Bug ID: 87174
   Summary: virt-specifier not recognized on function declared
like a variable
   Product: gcc
   Version: 9.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: blitzrakete at gmail dot com
  Target Milestone: ---

Gcc (no flags) doesn't compile the following code:

using F = void();

struct X {
  virtual F f;
};

struct Y : X {
  F f override;
};

Clang can compile this code just fine. The (trimmed) error message is:

:8:5: error: expected ';' at end of member declaration
:8:7: error: 'override' does not name a type

[Bug c++/87136] internal compiler error: in emit_move_insn, at expr.c:3722

2018-08-31 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87136

Jakub Jelinek  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 CC||jakub at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #8 from Jakub Jelinek  ---
Why are you using a prerelease of gcc, when it has been released almost 4
months ago?  This bug has been fixed 9 days after your snapshot has been taken.

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

[Bug middle-end/85496] [6/7/8 Regression] internal compiler error: in emit_move_insn, at expr.c:3722

2018-08-31 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85496

Jakub Jelinek  changed:

   What|Removed |Added

 CC||darko.veberic at ijs dot si

--- Comment #9 from Jakub Jelinek  ---
*** Bug 87136 has been marked as a duplicate of this bug. ***

[Bug middle-end/87173] -Walloc-size-larger-than= silently fails for operands/size values larger than __SIZE_MAX__

2018-08-31 Thread jozef.l at mittosystems dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87173

--- Comment #2 from Jozef Lawrynowicz  ---
Right, thanks.
I'll just submit a patch for gcc.dg/Walloc-size-larger-than-{4,5,6,7}.c to
require "size32plus" then.

  1   2   >