[Bug middle-end/85811] Invalid optimization with fmax, fabs and nan

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85811

Richard Biener  changed:

   What|Removed |Added

  Known to work||11.0
   Assignee|unassigned at gcc dot gnu.org  |sayle at gcc dot gnu.org
 Status|NEW |ASSIGNED

[Bug target/98093] ICE in gen_vsx_set_v2df, at config/rs6000/vsx.md:3276

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98093

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2020-12-02
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

[Bug target/98093] New: ICE in gen_vsx_set_v2df, at config/rs6000/vsx.md:3276

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98093

Bug ID: 98093
   Summary: ICE in gen_vsx_set_v2df, at config/rs6000/vsx.md:3276
   Product: gcc
   Version: 11.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
Target: ppc64le-linux-gnu

The following fails:

$ ppc64le-linux-gnu-gcc
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/uninit-pr78295.c -Ofast
--param=max-completely-peeled-insns=0 -fno-ivopts -c
during RTL pass: expand
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/uninit-pr78295.c: In function
‘f’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/uninit-pr78295.c:11:10:
internal compiler error: in gen_vsx_set_v2df, at config/rs6000/vsx.md:3276
   11 | t[i] = x; /* { dg-bogus "uninitialized" } */
  | ~^~~
0x5d77b8 gen_vsx_set_v2df(rtx_def*, rtx_def*, rtx_def*, rtx_def*)
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/config/rs6000/vsx.md:3276
0xdcdc82 rs6000_expand_vector_set(rtx_def*, rtx_def*, rtx_def*)
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/config/rs6000/rs6000.c:7000
0x10c6990 ???
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/config/rs6000/vector.md:1251
0xa09b68 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/optabs.c:7705
0x8cddbc expand_vec_set_optab_fn
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/internal-fn.c:2879
0x8cddbc expand_VEC_SET
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/internal-fn.def:148
0x70ed87 expand_call_stmt
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/cfgexpand.c:2740
0x70ed87 expand_gimple_stmt_1
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/cfgexpand.c:3835
0x70ed87 expand_gimple_stmt
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/cfgexpand.c:3999
0x7146b7 expand_gimple_basic_block
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/cfgexpand.c:6040
0x7146b7 execute
   
/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-trunk-ppc64le/build/gcc/cfgexpand.c:6724
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug lto/45375] [meta-bug] Issues with building Mozilla (i.e. Firefox) with LTO

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45375
Bug 45375 depends on bug 88702, which changed state.

Bug 88702 Summary: [8/9/10/11 regression] We do terrible job optimizing 
IsHTMLWhitespace from Firefox
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88702

   What|Removed |Added

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

[Bug tree-optimization/88702] [8/9/10/11 regression] We do terrible job optimizing IsHTMLWhitespace from Firefox

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88702

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #15 from Martin Liška  ---
Implemented on the current master.

[Bug c/97172] [11 Regression] ICE: tree code ‘ssa_name’ is not supported in LTO streams since r11-3303-g6450f07388f9fe57

2020-12-01 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97172

--- Comment #20 from rguenther at suse dot de  ---
On Tue, 1 Dec 2020, hubicka at ucw dot cz wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97172
> 
> --- Comment #19 from Jan Hubicka  ---
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97172
> > 
> > --- Comment #18 from Martin Sebor  ---
> > Let me explain how this works.  The VLA bounds in function parameters are 
> > used
> > in two ways:
> > 1) in the front end, to check function redeclarations involving arrays and 
> > VLAs
> > for equivalence,
> > 2) in the middle end, to check function calls for out of bounds accesses.
> > 
> > As an example of (1) consider the following declarations of function f():
> > 
> >   void f (int X, int, int A[X], int B[foo()]);
> > and
> >   void f (int, int J, int A[J], int B[foo() + 1]);
> > 
> > The bounds in the parameters A and B are different and we'd like them
> > diagnosed.  The bound X is the first parameter in the first declaration of f
> > but J is the second parameter in the second f().  Because the bounds are 
> > also
> > parameters, we use their positions in the argument list to determine that 
> > they
> > don't match.
> > 
> > Likewise, the bound foo() in B is different from foo() + 1, but because 
> > neither
> > is a parameter the only way to determine whether they match is by comparing
> > them for equivalence.  The code uses operand_equal_p(..., 
> > OEP_LEXICOGRAPHIC).
> > 
> > (2) is done only for bounds that are parameters.  Other bounds are not used 
> > for
> > anything, but they're still stored in the attributes so they can be 
> > compared in
> > the redeclarations.
> > 
> > Since the "complex" bounds aren't used after the front end is done with 
> > them,
> > unless there's a way to remove them at some point after the front end is 
> > done
> > (or set them to NULL or something), the LTO streaming code could ignore them
> > instead of asserting on them.  Alternatively, instead of storing them in 
> > their
> 
> free_lang_data should a good place to free them. In general we should
> avoid storing things to IL that are not useful to middle end and keep
> them there till LTO streaming.  Even if it does not make LTO streaming
> to ICE it stll consumes memory, disk space and compile time. 

The frontend needs to make sure no frontend specific tree codes leak
into GENERIC so GENERICization is the place where the FE should clear
those.  FLD is too late and doing it there would be a hack.

[Bug target/98079] [11 Regression] ICE in extract_insn, at recog.c:2315 since r11-5429-gacdf30d66cac1175

2020-12-01 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98079

Uroš Bizjak  changed:

   What|Removed |Added

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

--- Comment #4 from Uroš Bizjak  ---
Fixed.

[Bug target/98079] [11 Regression] ICE in extract_insn, at recog.c:2315 since r11-5429-gacdf30d66cac1175

2020-12-01 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98079

--- Comment #3 from Uroš Bizjak  ---
https://gcc.gnu.org/g:018248ef6d03ca0088d5928928f966df99af134c

commit r11-5644-g018248ef6d03ca0088d5928928f966df99af134c
Author: Uros Bizjak 
Date:   Wed Dec 2 08:15:03 2020 +0100

i386: Fix abs an maxmin expanders for TARGET_PARTIAL_REG_STALL [PR98079].

QImode shold be enabled only for !TARGET_PARTIAL_REG_STALL

2020-12-02  Uroš Bizjak  

PR target/98079

gcc/
* config/i386/i386.md (abs2): Enable QImode
only for !TARGET_PARTIAL_REG_STALL.
(*abs2_1): Ditto.
(3): Ditto.
(*3_1): Ditto.

gcc/testsuite/
* gcc.target/i386/pr98079.c: New test.

[Bug tree-optimization/88702] [8/9/10/11 regression] We do terrible job optimizing IsHTMLWhitespace from Firefox

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88702

--- Comment #14 from CVS Commits  ---
The master branch has been updated by Martin Liska :

https://gcc.gnu.org/g:c961e94901eb793b1a18d431a1acf7f682eaf04f

commit r11-5642-gc961e94901eb793b1a18d431a1acf7f682eaf04f
Author: Martin Liska 
Date:   Tue Dec 1 12:18:46 2020 +0100

if-to-switch: Support chain with 2 BBs.

As seen in the test-case, even 2 BBs can handle interesting
cases covered by a jump table or a bit-test.

gcc/ChangeLog:

PR tree-optimization/88702
* gimple-if-to-switch.cc (pass_if_to_switch::execute):
Require at least 2 BBs.
* gimple-if-to-switch.cc (find_conditions): Require
equal precision for low and high of a range.

gcc/testsuite/ChangeLog:

PR tree-optimization/88702
* gcc.dg/tree-ssa/if-to-switch-9.c: New test.

[Bug tree-optimization/98084] [11 Regression] ICE in error: non-integral type switch statement

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98084

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #2 from Martin Liška  ---
Fixed.

[Bug tree-optimization/98084] [11 Regression] ICE in error: non-integral type switch statement

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98084

--- Comment #1 from CVS Commits  ---
The master branch has been updated by Martin Liska :

https://gcc.gnu.org/g:e4c02ce4ab6fce1148f4025360096f18764deadf

commit r11-5641-ge4c02ce4ab6fce1148f4025360096f18764deadf
Author: Martin Liska 
Date:   Tue Dec 1 17:25:36 2020 +0100

if-to-switch: consider only integral types

gcc/ChangeLog:

PR tree-optimization/98084
* gimple-if-to-switch.cc (find_conditions): Consider only
integral types.

gcc/testsuite/ChangeLog:

PR tree-optimization/98084
* gcc.dg/tree-ssa/pr98084.c: New test.

[Bug middle-end/85811] Invalid optimization with fmax, fabs and nan

2020-12-01 Thread asolokha at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85811

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #11 from Arseny Solokha  ---
Are there backports pending?

[Bug target/98092] New: [11 Regression] ICE in extract_insn, at recog.c:2315 (error: unrecognizable insn)

2020-12-01 Thread asolokha at gmx dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98092

Bug ID: 98092
   Summary: [11 Regression] ICE in extract_insn, at recog.c:2315
(error: unrecognizable insn)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: owerpc-*-linux-gnu

gcc-11.0.0-alpha20201129 snapshot (g:bb67ad5cff58a707aaae645d4f45a913d8511c86)
ICEs when compiling the following testcase, reduced from
gcc/testsuite/gcc.target/powerpc/bcd-4.c, w/ -mcpu=power9 -ffinite-math-only:

int
h9 (__attribute__ ((altivec (vector__))) char un)
{
  return (__builtin_vec_bcdinvalid (un));
}

% powerpc-e300c3-linux-gnu-gcc-11.0.0 -mcpu=power9 -ffinite-math-only -c
n1uis1ie.c
n1uis1ie.c: In function 'h9':
n1uis1ie.c:5:1: error: unrecognizable insn:
5 | }
  | ^
(insn 8 7 11 2 (set (reg:SI 118 [ _3 ])
(unordered:SI (reg:CCFP 106 6)
(const_int 0 [0]))) "n1uis1ie.c":4:10 -1
 (nil))
during RTL pass: vregs
n1uis1ie.c:5:1: internal compiler error: in extract_insn, at recog.c:2315
0x68050a _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/rtl-error.c:108
0x68052a _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/rtl-error.c:116
0x67ebf3 extract_insn(rtx_insn*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/recog.c:2315
0xacbbe1 instantiate_virtual_regs_in_insn
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/function.c:1609
0xacbbe1 instantiate_virtual_regs
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/function.c:1979
0xacbbe1 execute
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/gcc/function.c:2028

[Bug c++/97093] ICE on C++20 code when chaining requirements (in hashtab_chk_error, at hash-table.c:137)

2020-12-01 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97093

Patrick Palka  changed:

   What|Removed |Added

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

[Bug c++/97093] ICE on C++20 code when chaining requirements (in hashtab_chk_error, at hash-table.c:137)

2020-12-01 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97093

Patrick Palka  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2020-12-02
 CC||ppalka at gcc dot gnu.org
 Status|UNCONFIRMED |NEW

--- Comment #1 from Patrick Palka  ---
Confirmed.

[Bug c++/97947] [11 Regression] ICE in digest_init_r, at cp/typeck2.c:1145

2020-12-01 Thread bergner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97947

--- Comment #5 from Peter Bergner  ---
(In reply to Marek Polacek from comment #2)
> We crash here
> 
> 1143   /* Come here only for aggregates: records, arrays, unions, complex
> numbers
> 1144  and vectors.  */
> 1145   gcc_assert (code == ARRAY_TYPE
> 1146   || VECTOR_TYPE_P (type)
> 1147   || code == RECORD_TYPE
> 1148   || code == UNION_TYPE
> 1149   || code == COMPLEX_TYPE);
> 
> because code == OPAQUE_TYPE.

Since OPAQUE_TYPE is a type of aggregate, I modified the assert to allow code
== OPAQUE_TYPE and that fixes the ICE.  I don't feel comfortable sprinkling
other OPAQUE_TYPE usage around anywhere else unless we have a test case that
shows we need it.

[Bug c/98091] New: unspecified VLA bound formatted as [0] instead of [*] in -Wvla-parameter

2020-12-01 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98091

Bug ID: 98091
   Summary: unspecified VLA bound formatted as [0] instead of [*]
in -Wvla-parameter
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: msebor at gcc dot gnu.org
  Target Milestone: ---

The mismatched VLA bound in the argument in the second warning should be
formatted the same way as in the first warning, i.e., as 'int[n][*]', and not
as 'int[n][0]'

The test case has been extracted from gcc/testsuite/gcc.dg/Wvla-parameter-2.c.

$ cat a.c && gcc -S -Wall a.c
int n;

void f (int[n][n]);
void f (int[*][n]);

void g (int[n][n]);
void g (int[n][*]);
a.c:4:9: warning: argument 1 of type ‘int[*][n]’ declared with 1 unspecified
variable bound [-Wvla-parameter]
4 | void f (int[*][n]);
  | ^
a.c:3:9: note: previously declared as ‘int[n][n]’ with 0 unspecified variable
bounds
3 | void f (int[n][n]);
  | ^
a.c:7:9: warning: argument 1 of type ‘int[n][0]’ declared with 1 unspecified
variable bound [-Wvla-parameter]
7 | void g (int[n][*]);
  | ^
a.c:6:9: note: previously declared as ‘int[n][n]’ with 0 unspecified variable
bounds
6 | void g (int[n][n]);
  | ^

[Bug c++/98043] [8/9/10/11 Regression] ICE ‘verify_gimple’ failed since r5-3726-g083e891e69429f93b958f6c18e2d52f515bae572

2020-12-01 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98043

Marek Polacek  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/98043] [8/9/10/11 Regression] ICE ‘verify_gimple’ failed since r5-3726-g083e891e69429f93b958f6c18e2d52f515bae572

2020-12-01 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98043

Marek Polacek  changed:

   What|Removed |Added

   Target Milestone|11.0|8.5

--- Comment #4 from Marek Polacek  ---
Candidate fix:

--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -3711,6 +3711,10 @@ pop_switch (void)
 SWITCH_STMT_ALL_CASES_P (cs->switch_stmt) = 1;
   if (!cs->break_stmt_seen_p)
 SWITCH_STMT_NO_BREAK_P (cs->switch_stmt) = 1;
+  if (SWITCH_STMT_TYPE (cs->switch_stmt)
+  && SCOPED_ENUM_P (SWITCH_STMT_TYPE (cs->switch_stmt)))
+SWITCH_STMT_TYPE (cs->switch_stmt)
+  = TREE_TYPE (SWITCH_STMT_COND (cs->switch_stmt));
   gcc_assert (!cs->in_loop_body_p);
   splay_tree_delete (cs->cases);
   switch_stack = switch_stack->next;

[Bug middle-end/19987] [meta-bug] fold missing optimizations in general

2020-12-01 Thread law at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19987
Bug 19987 depends on bug 96708, which changed state.

Bug 96708 Summary: Failure to optimize max pattern with comparison when using a 
temporary variable
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96708

   What|Removed |Added

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

[Bug tree-optimization/96708] Failure to optimize max pattern with comparison when using a temporary variable

2020-12-01 Thread law at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96708

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #4 from Jeffrey A. Law  ---
Should be fixed with Eugene's patch on the trunk

[Bug tree-optimization/96708] Failure to optimize max pattern with comparison when using a temporary variable

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96708

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Jeff Law :

https://gcc.gnu.org/g:abef36919f741c8e4f7380b2c2ffbc6ad97c2b6b

commit r11-5631-gabef36919f741c8e4f7380b2c2ffbc6ad97c2b6b
Author: Eugene Rozenfeld 
Date:   Tue Dec 1 16:26:59 2020 -0700

Optimize max/min pattern with comparison

gcc/
PR tree-optimization/96708
* match.pd: New pattern for comparing X with MAX (X, Y)
or MIN (X, y).

gcc/testsuite
* gcc.dg/pr96708-negative.c: New test.
* gcc.dg/pr96708-positive.c: New test.

[Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 since r11-4386-g9e2256dcd481ffe3

2020-12-01 Thread ville.voutilainen at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98054

Ville Voutilainen  changed:

   What|Removed |Added

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

--- Comment #6 from Ville Voutilainen  ---
Fixed.

[Bug c++/98054] [11 Regression] ICE: in pp_cxx_trait_expression, at cp/cxx-pretty-print.c:2671 since r11-4386-g9e2256dcd481ffe3

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98054

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Ville Voutilainen :

https://gcc.gnu.org/g:bec21c625d50276651410452e792718d228cfb5c

commit r11-5629-gbec21c625d50276651410452e792718d228cfb5c
Author: Ville Voutilainen 
Date:   Wed Dec 2 00:20:46 2020 +0200

Add pretty-printing support for __is_nothrow_{assignable,constructible}.

gcc/cp/ChangeLog:

PR c++/98054
* cxx-pretty-print.c (pp_cxx_trait_expression):
Add support for __is_nothrow_{assignable,constructible}.

[Bug tree-optimization/97595] [11 Regression] bogus -Wstringop-overflow due to DECL_SIZE_UNIT underreporting field size

2020-12-01 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97595

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #8 from Martin Sebor  ---
Fixed in r11-5628.

[Bug tree-optimization/97595] [11 Regression] bogus -Wstringop-overflow due to DECL_SIZE_UNIT underreporting field size

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97595

--- Comment #7 from CVS Commits  ---
The master branch has been updated by Martin Sebor :

https://gcc.gnu.org/g:b76f83e3859f738809d3aa8bd9dc14e10fc40e24

commit r11-5628-gb76f83e3859f738809d3aa8bd9dc14e10fc40e24
Author: Martin Sebor 
Date:   Tue Dec 1 15:10:30 2020 -0700

PR middle-end/97595 - bogus -Wstringop-overflow due to DECL_SIZE_UNIT
underreporting field size

gcc/ChangeLog:

PR middle-end/97595
* tree.c (component_ref_size): Fail when DECL_SIZE != TYPE_SIZE.
* tree.h (DECL_SIZE, TYPE_SIZE): Update comment.

gcc/testsuite/ChangeLog:

PR middle-end/97595
* g++.dg/warn/Warray-bounds-14.C: New test.
* g++.dg/warn/Wstringop-overflow-6.C: New test.

[Bug tree-optimization/85741] [meta-bug] bogus/missing -Wformat-overflow

2020-12-01 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85741
Bug 85741 depends on bug 97373, which changed state.

Bug 97373 Summary: missing warning on sprintf into allocated destination
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97373

   What|Removed |Added

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

[Bug middle-end/97373] missing warning on sprintf into allocated destination

2020-12-01 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97373

Martin Sebor  changed:

   What|Removed |Added

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

--- Comment #4 from Martin Sebor  ---
Done in r11-5622.

[Bug c++/98072] [9/10/11 Regression] ICE in cp_parser_omp_var_list_no_open, at cp/parser.c:34843

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:91ddf867a57b028ab322b737ea8355d5a472cd44

commit r11-5623-g91ddf867a57b028ab322b737ea8355d5a472cd44
Author: Jakub Jelinek 
Date:   Tue Dec 1 21:41:44 2020 +0100

openmp: Avoid ICE on depend clause on depobj OpenMP construct [PR98072]

Since r11-5430 we ICE on the following testcase.  When parsing the depobj
directive we don't really use cp_parser_omp_all_clauses routine which ATM
disables generation of location wrappers and the newly added assertion
that there are no location wrappers thus triggers.

Fixed by adding the location wrappers suppression sentinel.

Longer term, we should handle location wrappers inside of OpenMP clauses.

2020-12-01  Jakub Jelinek  

PR c++/98072
* parser.c (cp_parser_omp_depobj): Suppress location wrappers when
parsing depend clause.

* c-c++-common/gomp/depobj-2.c: New test.

[Bug middle-end/97373] missing warning on sprintf into allocated destination

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97373

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Martin Sebor :

https://gcc.gnu.org/g:d02c41dd414dcc65a08bc82f312f7808b5d90028

commit r11-5622-gd02c41dd414dcc65a08bc82f312f7808b5d90028
Author: Martin Sebor 
Date:   Tue Dec 1 13:38:08 2020 -0700

PR middle-end/97373 - missing warning on sprintf into allocated destination

gcc/ChangeLog:

PR middle-end/97373
* builtins.c (compute_objsize): Rename...
(compute_objsize_r): to this.  Change order and types of arguments.
Use new argument.  Adjust calls to self.
(access_ref::get_ref): New member function.
(pointer_query::pointer_query): New member function.
(pointer_query::get_ref): Same.
(pointer_query::put_ref): Same.
(handle_min_max_size): Change order and types of arguments.
(maybe_emit_free_warning): Add a test.
* builtins.h (class pointer_query): New class.
(compute_objsize): Declare an overload.
* gimple-ssa-sprintf.c (get_destination_size): Add argument.
(handle_printf_call): Change argument type.
* tree-ssa-strlen.c (adjust_last_stmt): Add an argument and use it.
(maybe_warn_overflow): Same.
(handle_builtin_strcpy): Same.
(maybe_diag_stxncpy_trunc): Same.
(handle_builtin_memcpy): Change argument type.  Adjust calls.
(handle_builtin_strcat): Same.
(handle_builtin_memset): Same.
(handle_store): Same.
(strlen_check_and_optimize_call): Same.
(check_and_optimize_stmt): Same.
(strlen_dom_walker): Add new data members.
(strlen_dom_walker::before_dom_children): Use new member.
(printf_strlen_execute): Dump cache performance counters.  Remove
objsize pass cleanup.
* tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Add argument.
(handle_printf_call): Change argument type.

gcc/testsuite/ChangeLog:

PR middle-end/97373
* gcc.dg/tree-ssa/builtin-sprintf-warn-25.c: New test.

[Bug target/97992] ICE in subst_asm_stack_regs, at reg-stack.c:2264

2020-12-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97992

Andrew Pinski  changed:

   What|Removed |Added

 Depends on||69899

--- Comment #3 from Andrew Pinski  ---
Most likely a dup of bug 69899.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69899
[Bug 69899] gcc ICE on invalid code on x86_64-linux-gnu in "replace_reg"

[Bug c++/97947] [11 Regression] ICE in digest_init_r, at cp/typeck2.c:1145

2020-12-01 Thread bergner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97947

Peter Bergner  changed:

   What|Removed |Added

   Assignee|acsawdey at gcc dot gnu.org|bergner at gcc dot 
gnu.org

--- Comment #4 from Peter Bergner  ---
(In reply to acsawdey from comment #3)
> I'll take a look at this. Probably missed something when adding OPAQUE_TYPE.

Aaron and I talked offline and I will actually be looking at this.  I have it
recreated with a native build.

[Bug c/98089] ICE in build_outer_var_ref, at omp-low.c:725

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98089

Martin Liška  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 CC||jakub at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-12-01

--- Comment #1 from Martin Liška  ---
Started with r6-3899-gd9a6bd32adc40a7e, it was rejected before that.

[Bug c/98090] ICE in simd_clone_adjust_argument_types, at omp-simd-clone.c:591

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98090

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2020-12-01
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
 CC||jakub at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška  ---
Started likely with GCC 4.9.0, then it was gone for GCC 8 branch: started to be
fixed with r8-3599-g8139a48e67ec9f17 and then again started to ICE with
r9-5839-gcfc30fd17588446c.

[Bug testsuite/98085] [11 regression] new test case gcc.dg/tree-ssa/if-to-switch-2.c fails in r11-5605

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98085

Martin Liška  changed:

   What|Removed |Added

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

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

[Bug testsuite/98085] [11 regression] new test case gcc.dg/tree-ssa/if-to-switch-2.c fails in r11-5605

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98085

--- Comment #2 from CVS Commits  ---
The master branch has been updated by Martin Liska :

https://gcc.gnu.org/g:efd1d4f8ae2850e5cd8028531dfe4eced628489e

commit r11-5618-gefd1d4f8ae2850e5cd8028531dfe4eced628489e
Author: Martin Liska 
Date:   Tue Dec 1 20:38:40 2020 +0100

if-to-switch: Fix test-suite patterns.

gcc/testsuite/ChangeLog:

PR testsuite/98085
* g++.dg/tree-ssa/if-to-switch-1.C: Do not expect precise number
of BBs.
* gcc.dg/tree-ssa/if-to-switch-1.c: Likewise.
* gcc.dg/tree-ssa/if-to-switch-2.c: Likewise. Find better name
for the function.
* gcc.dg/tree-ssa/if-to-switch-3.c: Likewise. Find better name
for the function.
* gcc.dg/tree-ssa/if-to-switch-5.c: Likewise.

[Bug c/98087] [11 Regression] ICE: Floating point exception

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98087

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška  ---
Just for the record, started with r11-5196-g1bea0d0aa5936cb3.

[Bug target/92729] [avr] Convert the backend to MODE_CC so it can be kept in future releases

2020-12-01 Thread abebeos at lazaridis dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92729

--- Comment #28 from abebeos at lazaridis dot com ---
(In reply to Senthil Kumar Selvaraj from comment #21)
[...]
> I don't have the spare time now to start full fledged work on this, but I
> can help with any issues you run into.

Just a questions re your version, see
https://github.com/saaadhu/gcc-avr-cc0/issues/1.

As for my current main tests, there are 4 issues:
https://github.com/abebeos/avr-gnu/issues

[Bug c/98087] [11 Regression] ICE: Floating point exception

2020-12-01 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98087

Jakub Jelinek  changed:

   What|Removed |Added

 CC|jakub at redhat dot com|jakub at gcc dot gnu.org
   Target Milestone|--- |11.0
 Ever confirmed|0   |1
   Last reconfirmed||2020-12-01
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
 Status|UNCONFIRMED |ASSIGNED

[Bug c++/97947] [11 Regression] ICE in digest_init_r, at cp/typeck2.c:1145

2020-12-01 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97947

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

[Bug c++/97947] [11 Regression] ICE in digest_init_r, at cp/typeck2.c:1145

2020-12-01 Thread acsawdey at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97947

acsawdey at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from acsawdey at gcc dot gnu.org ---
I'll take a look at this. Probably missed something when adding OPAQUE_TYPE.

[Bug c/98090] New: ICE in simd_clone_adjust_argument_types, at omp-simd-clone.c:591

2020-12-01 Thread gscfq--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98090

Bug ID: 98090
   Summary: ICE in simd_clone_adjust_argument_types, at
omp-simd-clone.c:591
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :


$ cat z1.c
void f ();
#pragma omp declare simd
void f ()
{
  void f (int a);
}


$ gcc-11-20201129 -c z1.c -fopenmp
during IPA pass: simdclone
z1.c: In function 'f.simdclone.0':
z1.c:6:1: internal compiler error: Segmentation fault
6 | }
  | ^
0xb49eaf crash_signal
../../gcc/toplev.c:330
0x1495435 simd_clone_adjust_argument_types
../../gcc/omp-simd-clone.c:591
0x14959b7 simd_clone_adjust
../../gcc/omp-simd-clone.c:1200
0x149960e expand_simd_clones(cgraph_node*)
../../gcc/omp-simd-clone.c:1777
0x1499b07 ipa_omp_simd_clone
../../gcc/omp-simd-clone.c:1798
0x1499b07 execute
../../gcc/omp-simd-clone.c:1826

[Bug c/98089] New: ICE in build_outer_var_ref, at omp-low.c:725

2020-12-01 Thread gscfq--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98089

Bug ID: 98089
   Summary: ICE in build_outer_var_ref, at omp-low.c:725
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gs...@t-online.de
  Target Milestone: ---

Started with r6 :


$ cat z1.c
void f (int n)
{
#pragma omp for linear(n:1)
  for (int i = 0; i < 8; i++)
n++;
}


$ gcc-11-20201129 -c z1.c -fopenmp
during GIMPLE pass: omplower
z1.c: In function 'f':
z1.c:3:9: internal compiler error: in build_outer_var_ref, at omp-low.c:725
3 | #pragma omp for linear(n:1)
  | ^~~
0xa257de build_outer_var_ref
../../gcc/omp-low.c:725
0xa33b37 lower_rec_input_clauses
../../gcc/omp-low.c:5777
0xa3cf6d lower_omp_for
../../gcc/omp-low.c:10917
0xa2bf3e lower_omp_1
../../gcc/omp-low.c:13231
0xa2bf3e lower_omp
../../gcc/omp-low.c:13418
0xa2acad lower_omp_1
../../gcc/omp-low.c:13215
0xa2acad lower_omp
../../gcc/omp-low.c:13418
0xa2acad lower_omp_1
../../gcc/omp-low.c:13215
0xa2acad lower_omp
../../gcc/omp-low.c:13418
0xa327d3 execute_lower_omp
../../gcc/omp-low.c:13457
0xa327d3 execute
../../gcc/omp-low.c:13505

[Bug c/98088] New: [9/10/11 Regression] ICE in expand_oacc_collapse_init, at omp-expand.c:1533

2020-12-01 Thread gscfq--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98088

Bug ID: 98088
   Summary: [9/10/11 Regression] ICE in expand_oacc_collapse_init,
at omp-expand.c:1533
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gs...@t-online.de
  Target Milestone: ---

Started with r7 :


$ cat z1.c
void f ()
{
  #pragma acc parallel loop tile(2, 3)
  for (int i = 0; i > 8; i++)
for (int j = 0; j > 8; j++);
}


$ cat z2.c
void f ()
{
  #pragma acc parallel loop tile(2, 3)
  for (int i = 0; i > 8; i++)
for (long j = 0; j > 8; j++);
}


$ gcc-6 -c z1.c -fopenmp -fopenacc
$
$ gcc-11-20201129 -c z1.c -fopenmp -fopenacc
during GIMPLE pass: ompexp
z1.c: In function 'f':
z1.c:3:11: internal compiler error: in expand_oacc_collapse_init, at
omp-expand.c:1533
3 |   #pragma acc parallel loop tile(2, 3)
  |   ^~~
0x1479f31 expand_oacc_collapse_init
../../gcc/omp-expand.c:1533
0x1479f31 expand_oacc_for
../../gcc/omp-expand.c:7537
0x148f361 expand_omp_for
../../gcc/omp-expand.c:8011
0x148fd5a expand_omp
../../gcc/omp-expand.c:9901
0x149008e expand_omp
../../gcc/omp-expand.c:9887
0x1491bed execute_expand_omp
../../gcc/omp-expand.c:10133

[Bug c/98087] New: [11 Regression] ICE: Floating point exception

2020-12-01 Thread gscfq--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98087

Bug ID: 98087
   Summary: [11 Regression] ICE: Floating point exception
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gs...@t-online.de
  Target Milestone: ---

Changed between 20201115 and 20201122 :


$ cat z1.c
struct S {};
void foo (int n)
{
  struct S a[n][0];
  __builtin_clear_padding (a);
}


$ gcc-11-20201129 -c z1.c
during GIMPLE pass: lower
z1.c: In function 'foo':
z1.c:2:6: internal compiler error: Floating point exception
2 | void foo (int n)
  |  ^~~
0xb49eaf crash_signal
../../gcc/toplev.c:330
0x8b9ff1 clear_padding_type
../../gcc/gimple-fold.c:4555
0x8ba973 gimple_fold_builtin_clear_padding
../../gcc/gimple-fold.c:4723
0x8c4c5f gimple_fold_builtin
../../gcc/gimple-fold.c:4897
0x8c6f6b gimple_fold_call
../../gcc/gimple-fold.c:5328
0x8c6f6b fold_stmt_1
../../gcc/gimple-fold.c:6029
0x13bfee9 lower_stmt
../../gcc/gimple-low.c:388
0x13bfee9 lower_sequence
../../gcc/gimple-low.c:217
0x13bffcc lower_stmt
../../gcc/gimple-low.c:286
0x13bffcc lower_sequence
../../gcc/gimple-low.c:217
0x13bfd58 lower_gimple_bind
../../gcc/gimple-low.c:473
0x13c0a91 lower_function_body
../../gcc/gimple-low.c:110
0x13c0a91 execute
../../gcc/gimple-low.c:195

[Bug c/98086] New: [9/10/11 Regression] ICE in extract_insn, at recog.c:2315

2020-12-01 Thread gscfq--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98086

Bug ID: 98086
   Summary: [9/10/11 Regression] ICE in extract_insn, at
recog.c:2315
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gs...@t-online.de
  Target Milestone: ---

Started with r6 :


$ cat z1.c
struct S {
  int a, b, c, d;
} x;
void f ()
{
  asm ("" : "=@ccc"(x));
}


$ gcc-5 -c z1.c
z1.c: In function 'f':
z1.c:6:3: error: inconsistent operand constraints in an 'asm'
   asm ("" : "=@ccc"(x));
   ^
$
$ gcc-11-20201129 -c z1.c
z1.c: In function 'f':
z1.c:7:1: error: unrecognizable insn:
7 | }
  | ^
(insn 7 6 5 2 (set (reg:TI 82)
(zero_extend:TI (reg:QI 83))) "z1.c":6:3 -1
 (nil))
during RTL pass: vregs
z1.c:7:1: internal compiler error: in extract_insn, at recog.c:2315
0x5f2645 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc/rtl-error.c:108
0x5f2664 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/rtl-error.c:116
0xabf2b7 extract_insn(rtx_insn*)
../../gcc/recog.c:2315
0x89cc63 instantiate_virtual_regs_in_insn
../../gcc/function.c:1609
0x89cc63 instantiate_virtual_regs
../../gcc/function.c:1979
0x89cc63 execute
../../gcc/function.c:2028

[Bug c/97992] ICE in subst_asm_stack_regs, at reg-stack.c:2264

2020-12-01 Thread gscfq--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97992

--- Comment #2 from G. Steinmetz  ---

Presumably related :


$ cat z2.c
long double
f (long double x)
{
  asm ("fsqrt" :: ""(x));
  return 1.0 - x;
}


$ cat z5.c
double
foo (double a)
{
  for (int i=0; i<4; i++)
  {
asm ("mov %1" : "="(a) : ""(a));
  }
  return a;
}


$ gcc-11-20201129 -c z2.c -O2
during RTL pass: stack
z2.c: In function 'f':
z2.c:6:1: internal compiler error: in change_stack, at reg-stack.c:2646
6 | }
  | ^
0xac4218 change_stack
../../gcc/reg-stack.c:2646
0xac44ec subst_asm_stack_regs
../../gcc/reg-stack.c:2254
0xac655d subst_stack_regs
../../gcc/reg-stack.c:2425
0xac68d7 convert_regs_1
../../gcc/reg-stack.c:3080
0xac68d7 convert_regs_2
../../gcc/reg-stack.c:3214
0xac7a8d convert_regs
../../gcc/reg-stack.c:3249
0xac7a8d reg_to_stack
../../gcc/reg-stack.c:3374
0xac7a8d rest_of_handle_stack_regs
../../gcc/reg-stack.c:3429
0xac7a8d execute
../../gcc/reg-stack.c:3460

[Bug tree-optimization/80532] warning on pointer access after free

2020-12-01 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80532

--- Comment #5 from Martin Sebor  ---
My hope is to implement the warning in the middle end (I actually have a
prototype  but it's not ready for GCC 11).

[Bug testsuite/98085] [11 regression] new test case gcc.dg/tree-ssa/if-to-switch-2.c fails in r11-5605

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98085

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
   Last reconfirmed||2020-12-01

--- Comment #1 from Martin Liška  ---
Mine.

[Bug middle-end/98055] __builtin_alloca should not have warn_unused_result attribute

2020-12-01 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98055

--- Comment #6 from Martin Sebor  ---
(In reply to Paul Smith from comment #5)
> Is there some preprocessor magic that lets me know that I'm using GCC's
> __builtin_alloc so I can avoid calling alloca(0) in that situation?

The following detects support for __builtin_alloca in GCC.  __has_builtin is
available in GCC 10 and later and all recent versions of Clang.

#ifdef __has_builtin
#  if __has_builtin (__builtin_alloca)
#warning have __builtin_alloca
#  else
#   warning no __builtin_alloca
#  endif
#else
# warning no __has_builtin
#endif

[Bug testsuite/98085] New: [11 regression] new test case gcc.dg/tree-ssa/if-to-switch-2.c fails in r11-5605

2020-12-01 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98085

Bug ID: 98085
   Summary: [11 regression] new test case
gcc.dg/tree-ssa/if-to-switch-2.c fails in r11-5605
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:03eb09292ef228d1d12b5168cdd748583b1f992a, r11-5605 

make  -k check-gcc RUNTESTFLAGS="tree-ssa.exp=gcc.dg/tree-ssa/if-to-switch-2.c"
. . .
Executing on host: /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-2.c   
-fdiagnostics-plain-output   -O2 -fdump-tree-iftoswitch-optimized -S -o
if-to-switch-2.s(timeout = 300)
spawn -ignore SIGHUP /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/tree-ssa/if-to-switch-2.c
-fdiagnostics-plain-output -O2 -fdump-tree-iftoswitch-optimized -S -o
if-to-switch-2.s
Executing on host: /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/ exceptions_enabled103054.cc   
-fdiagnostics-plain-output  -S -o exceptions_enabled103054.s(timeout = 300)
spawn -ignore SIGHUP /home/seurer/gcc/git/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-test/gcc/ exceptions_enabled103054.cc
-fdiagnostics-plain-output -S -o exceptions_enabled103054.s
PASS: gcc.dg/tree-ssa/if-to-switch-2.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/if-to-switch-2.c scan-tree-dump iftoswitch "Condition
chain with 3 BBs transformed into a switch statement."
testcase
/home/seurer/gcc/git/gcc-test/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp
completed in 0 seconds

=== gcc Summary ===

# of expected passes1
# of unexpected failures1

[Bug libstdc++/95322] std::list | take | transform, expression does not work cbegin() == end()

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95322

--- Comment #19 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Patrick Palka
:

https://gcc.gnu.org/g:be5f22ebe964244223f178330a66b67d3f58334e

commit r10-9104-gbe5f22ebe964244223f178330a66b67d3f58334e
Author: Patrick Palka 
Date:   Mon Oct 12 13:46:21 2020 -0400

libstdc++: Apply proposed resolution for LWG 3449 [PR95322]

Now that the frontend bug PR96805 is fixed, we can cleanly apply the
proposed resolution for this issue.

This slightly deviates from the proposed resolution by declaring _CI a
member of take_view instead of take_view::_Sentinel, since it doesn't
depend on anything within _Sentinel anymore.

libstdc++-v3/ChangeLog:

PR libstdc++/95322
* include/std/ranges (take_view::_CI): Define this alias
template as per LWG 3449 and remove ...
(take_view::_Sentinel::_CI): ... this type alias.
(take_view::_Sentinel::operator==): Adjust use of _CI
accordingly.  Define a second overload that accepts an iterator
of the opposite constness as per LWG 3449.
(take_while_view::_Sentinel::operator==): Likewise.
* testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.

(cherry picked from commit e066821b6f6b7332c7a67981f7b33c9ba0ccaee7)

[Bug tree-optimization/98084] [11 Regression] ICE in error: non-integral type switch statement

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98084

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2020-12-01
 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org

[Bug tree-optimization/98084] New: [11 Regression] ICE in error: non-integral type switch statement

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98084

Bug ID: 98084
   Summary: [11 Regression] ICE in error: non-integral type switch
statement
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

It's since if-to-switch revision, reduced from systemd:

$ cat ~/Programming/testcases/json.i
enum {
  JSON_VARIANT_STRING,
  JSON_VARIANT_UNSIGNED,
  JSON_VARIANT_REAL,
  JSON_VARIANT_ARRAY,
  _JSON_VARIANT_TYPE_INVALID,
  _JSON_VARIANT_MAGIC_ZERO_UNSIGNED,
  _JSON_VARIANT_MAGIC_ZERO_REAL,
  _JSON_VARIANT_MAGIC_EMPTY_STRING,
  _JSON_VARIANT_MAGIC_EMPTY_ARRAY
} json_variant_type(int *v) {
  if (!v)
return _JSON_VARIANT_TYPE_INVALID;
  if (v == (int *)_JSON_VARIANT_MAGIC_ZERO_UNSIGNED)
return JSON_VARIANT_UNSIGNED;
  if (v == (int *)_JSON_VARIANT_MAGIC_ZERO_REAL)
return JSON_VARIANT_REAL;
  if (v == (int *)_JSON_VARIANT_MAGIC_EMPTY_STRING)
return JSON_VARIANT_STRING;
  if (v == (int *)_JSON_VARIANT_MAGIC_EMPTY_ARRAY)
return JSON_VARIANT_ARRAY;
}

$ ./xgcc -B. ~/Programming/testcases/json.i -c -O2
/home/marxin/Programming/testcases/json.i: In function ‘json_variant_type’:
/home/marxin/Programming/testcases/json.i:22:1: error: non-integral type switch
statement
   22 | }
  | ^
int *
switch (v_2(D))  [INV], case 0B:  [INV], case 5B: 
[INV], case 6B:  [INV], case 7B:  [INV], case 8B:  [INV]>
during GIMPLE pass: iftoswitch
/home/marxin/Programming/testcases/json.i:22:1: internal compiler error:
verify_gimple failed
0xe365da verify_gimple_in_cfg(function*, bool)
/home/marxin/Programming/gcc/gcc/tree-cfg.c:5467
0xd1075f execute_function_todo
/home/marxin/Programming/gcc/gcc/passes.c:2042
0xd115ac do_per_function
/home/marxin/Programming/gcc/gcc/passes.c:1687
0xd115ac execute_todo
/home/marxin/Programming/gcc/gcc/passes.c:2096
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug tree-optimization/97595] [11 Regression] bogus -Wstringop-overflow due to DECL_SIZE_UNIT underreporting field size

2020-12-01 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97595

Martin Sebor  changed:

   What|Removed |Added

 CC||s...@li-snyder.org

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

[Bug c++/98083] [11 regression] -Warray-bounds false positive with virtual derivation

2020-12-01 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98083

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE
 CC||msebor at gcc dot gnu.org

--- Comment #1 from Martin Sebor  ---
Duplicate of pr97595.

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

[Bug c/97172] [11 Regression] ICE: tree code ‘ssa_name’ is not supported in LTO streams since r11-3303-g6450f07388f9fe57

2020-12-01 Thread hubicka at ucw dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97172

--- Comment #19 from Jan Hubicka  ---
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97172
> 
> --- Comment #18 from Martin Sebor  ---
> Let me explain how this works.  The VLA bounds in function parameters are used
> in two ways:
> 1) in the front end, to check function redeclarations involving arrays and 
> VLAs
> for equivalence,
> 2) in the middle end, to check function calls for out of bounds accesses.
> 
> As an example of (1) consider the following declarations of function f():
> 
>   void f (int X, int, int A[X], int B[foo()]);
> and
>   void f (int, int J, int A[J], int B[foo() + 1]);
> 
> The bounds in the parameters A and B are different and we'd like them
> diagnosed.  The bound X is the first parameter in the first declaration of f
> but J is the second parameter in the second f().  Because the bounds are also
> parameters, we use their positions in the argument list to determine that they
> don't match.
> 
> Likewise, the bound foo() in B is different from foo() + 1, but because 
> neither
> is a parameter the only way to determine whether they match is by comparing
> them for equivalence.  The code uses operand_equal_p(..., OEP_LEXICOGRAPHIC).
> 
> (2) is done only for bounds that are parameters.  Other bounds are not used 
> for
> anything, but they're still stored in the attributes so they can be compared 
> in
> the redeclarations.
> 
> Since the "complex" bounds aren't used after the front end is done with them,
> unless there's a way to remove them at some point after the front end is done
> (or set them to NULL or something), the LTO streaming code could ignore them
> instead of asserting on them.  Alternatively, instead of storing them in their

free_lang_data should a good place to free them. In general we should
avoid storing things to IL that are not useful to middle end and keep
them there till LTO streaming.  Even if it does not make LTO streaming
to ICE it stll consumes memory, disk space and compile time. 

Honza
> tree form they could be stored as strings instead.  I list these in the order
> of my preference for GCC 11.

Re: [Bug c/97172] [11 Regression] ICE: tree code ‘ssa_name’ is not supported in LTO streams since r11-3303-g6450f07388f9fe57

2020-12-01 Thread Jan Hubicka
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97172
> 
> --- Comment #18 from Martin Sebor  ---
> Let me explain how this works.  The VLA bounds in function parameters are used
> in two ways:
> 1) in the front end, to check function redeclarations involving arrays and 
> VLAs
> for equivalence,
> 2) in the middle end, to check function calls for out of bounds accesses.
> 
> As an example of (1) consider the following declarations of function f():
> 
>   void f (int X, int, int A[X], int B[foo()]);
> and
>   void f (int, int J, int A[J], int B[foo() + 1]);
> 
> The bounds in the parameters A and B are different and we'd like them
> diagnosed.  The bound X is the first parameter in the first declaration of f
> but J is the second parameter in the second f().  Because the bounds are also
> parameters, we use their positions in the argument list to determine that they
> don't match.
> 
> Likewise, the bound foo() in B is different from foo() + 1, but because 
> neither
> is a parameter the only way to determine whether they match is by comparing
> them for equivalence.  The code uses operand_equal_p(..., OEP_LEXICOGRAPHIC).
> 
> (2) is done only for bounds that are parameters.  Other bounds are not used 
> for
> anything, but they're still stored in the attributes so they can be compared 
> in
> the redeclarations.
> 
> Since the "complex" bounds aren't used after the front end is done with them,
> unless there's a way to remove them at some point after the front end is done
> (or set them to NULL or something), the LTO streaming code could ignore them
> instead of asserting on them.  Alternatively, instead of storing them in their

free_lang_data should a good place to free them. In general we should
avoid storing things to IL that are not useful to middle end and keep
them there till LTO streaming.  Even if it does not make LTO streaming
to ICE it stll consumes memory, disk space and compile time. 

Honza
> tree form they could be stored as strings instead.  I list these in the order
> of my preference for GCC 11.


[Bug c++/98083] New: [11 regression] -Warray-bounds false positive with virtual derivation

2020-12-01 Thread sss--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98083

Bug ID: 98083
   Summary: [11 regression] -Warray-bounds false positive with
virtual derivation
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: s...@li-snyder.org
  Target Milestone: ---

With gcc 11 (20201128), the following fragment gives a bogus warning
when compiled with -Wall -O2:

-- x.cc -
struct base1
{
  virtual ~base1();
};

struct base2
{
  virtual ~base2();
};

class base3 :   public base2, public virtual base1 {};

class istream_tie :
  public virtual base1,
  public virtual base3
{
};  

void foo()
{
  istream_tie in;
}
-

$ g++ -c -Wall   -O2  x.cc
x.cc: In function ‘void foo()’:
x.cc:13:7: warning: array subscript ‘base3[0]’ is partly outside array bounds
of ‘istream_tie [1]’ [-Warray-bounds]
   13 | class istream_tie :
  |   ^~~
x.cc:21:15: note: while referencing ‘in’
   21 |   istream_tie in;
  |   ^~
x.cc:11:7: warning: array subscript ‘base3[0]’ is partly outside array bounds
of ‘istream_tie [1]’ [-Warray-bounds]
   11 | class base3 :   public base2, public virtual base1 {};
  |   ^
x.cc:21:15: note: while referencing ‘in’
   21 |   istream_tie in;
  |   ^~


This looks particularly funny since the input source does not anywhere
use array indexing.  But this appears to have something to do with the
use of virtual derivation.

[Bug c/97172] [11 Regression] ICE: tree code ‘ssa_name’ is not supported in LTO streams since r11-3303-g6450f07388f9fe57

2020-12-01 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97172

--- Comment #18 from Martin Sebor  ---
Let me explain how this works.  The VLA bounds in function parameters are used
in two ways:
1) in the front end, to check function redeclarations involving arrays and VLAs
for equivalence,
2) in the middle end, to check function calls for out of bounds accesses.

As an example of (1) consider the following declarations of function f():

  void f (int X, int, int A[X], int B[foo()]);
and
  void f (int, int J, int A[J], int B[foo() + 1]);

The bounds in the parameters A and B are different and we'd like them
diagnosed.  The bound X is the first parameter in the first declaration of f
but J is the second parameter in the second f().  Because the bounds are also
parameters, we use their positions in the argument list to determine that they
don't match.

Likewise, the bound foo() in B is different from foo() + 1, but because neither
is a parameter the only way to determine whether they match is by comparing
them for equivalence.  The code uses operand_equal_p(..., OEP_LEXICOGRAPHIC).

(2) is done only for bounds that are parameters.  Other bounds are not used for
anything, but they're still stored in the attributes so they can be compared in
the redeclarations.

Since the "complex" bounds aren't used after the front end is done with them,
unless there's a way to remove them at some point after the front end is done
(or set them to NULL or something), the LTO streaming code could ignore them
instead of asserting on them.  Alternatively, instead of storing them in their
tree form they could be stored as strings instead.  I list these in the order
of my preference for GCC 11.

[Bug tree-optimization/97539] [10 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97539

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/97760] [10 Regression] GCC outputs wrong values when compiling the testcase with -O3 since r10-4200-gb7ff7cef5005721e

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97760

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/97812] [9/10 Regression] Wrong output when compiling the testcase with -O2 -flto since r9-4558-g476a31b55b5471262

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97812

--- Comment #14 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:041451586908fc1d76f45f5043c88f7b0ccb401b

commit r10-9103-g041451586908fc1d76f45f5043c88f7b0ccb401b
Author: Richard Biener 
Date:   Fri Nov 13 11:31:22 2020 +0100

tree-optimization/97812 - fix range query in VRP assert discovery

This makes sure to properly extend the input range before seeing
whether it fits the target.

2020-11-13  Richard Biener  

PR tree-optimization/97812
* tree-vrp.c (register_edge_assert_for_2): Extend the range
according to its sign before seeing whether it fits.

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

(cherry picked from commit dcfd302a79a5e2ea3bb16fc4fc45a5ee31cc0eab)

[Bug tree-optimization/97760] [10 Regression] GCC outputs wrong values when compiling the testcase with -O3 since r10-4200-gb7ff7cef5005721e

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97760

--- Comment #8 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:7b523f3dff5d7bf49294fe5b794f63cae28d5c5b

commit r10-9102-g7b523f3dff5d7bf49294fe5b794f63cae28d5c5b
Author: Richard Biener 
Date:   Mon Nov 9 15:19:56 2020 +0100

tree-optimization/97760 - reduction paths with unhandled live stmt

This makes sure we reject reduction paths with a live stmt that
is not the last one altering the value.  This is because we do not
handle this in the epilogue unless there's a scalar epilogue loop.

2020-11-09  Richard Biener  

PR tree-optimization/97760
* tree-vect-loop.c (check_reduction_path): Reject
reduction paths we do not handle in epilogue generation.

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

(cherry picked from commit 2686de5617bfb572343933be2883e8274c9735b5)

[Bug tree-optimization/97539] [10 Regression] ICE verify_ssa failed since r10-4200-gb7ff7cef5005721e

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97539

--- Comment #6 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:2acbc9d4d677d282eaeee4721a669c41d28e978a

commit r10-9101-g2acbc9d4d677d282eaeee4721a669c41d28e978a
Author: Richard Biener 
Date:   Mon Oct 26 10:08:38 2020 +0100

tree-optimization/97539 - reset out-of-loop debug uses before peeling

This makes sure to reset out-of-loop debug uses before vectorizer
loop peeling as we cannot make sure to retain the use-def dominance
relationship when there are no LC SSA nodes.

2020-10-26  Richard Biener  

PR tree-optimization/97539
* tree-vect-loop-manip.c (vect_do_peeling): Reset out-of-loop
debug uses before peeling.

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

(cherry picked from commit 27c14056f4805c9d8cfc655ef2c846be128b02c9)

[Bug tree-optimization/95171] ICE: verify_flow_info failed (error: wrong outgoing edge flags at end of bb 2)

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95171

--- Comment #6 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:1e676cfbe1e13fba2c636b560362ed4f0a56893d

commit r10-9100-g1e676cfbe1e13fba2c636b560362ed4f0a56893d
Author: Richard Biener 
Date:   Mon May 18 08:51:23 2020 +0200

middle-end/95171 - inlining of trapping compare into non-call EH fn

This fixes always-inlining across -fnon-call-exception boundaries
for conditions which we do not allow to throw.

2020-05-18  Richard Biener  

PR middle-end/95171
* tree-inline.c (remap_gimple_stmt): Split out trapping compares
when inlining into a non-call EH function.

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

(cherry picked from commit fe168751c5c1c517c7c89c9a1e4e561d66b24663)

[Bug rtl-optimization/97954] [11 Regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2360

2020-12-01 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97954

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[Bug rtl-optimization/97459] __uint128_t remainder for division by 3

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97459

--- Comment #23 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:855bb43f6d0bee5a74b5d3739456ca34b4609a50

commit r11-5614-g855bb43f6d0bee5a74b5d3739456ca34b4609a50
Author: Jakub Jelinek 
Date:   Tue Dec 1 16:25:06 2020 +0100

Improve double-word mod even on powerpc [PR97459]

I have noticed that while my (already committed, thanks for review)
patch works on x86, it doesn't work on powerpc*.  The problem is that
we don't have lshr double-word optab (neither TImode nor for -m32 DImode),
but as expander has code for double-word shift, that doesn't really matter.
As the implementation is prepared to punt whenever something can't be
expanded with OPTAB_DIRECT and in the end also punts if any library calls
would be emitted, the optab_handler checks were just to save compile time.

On the other side, for even divisors, we know that (1 << bit) % (2 * x)
for bit > 0 will never be equal to 1, because both dividend and divisor
are even and so remainder will be even too, so we can save some compile
time
by adding an early exit.

The even divisors can be handled with the approach Thomas wrote about
(perhaps generalized into divisors equal to what expand_doubleword_mod
can handle times some power of two where we can handle power of two modulo
cheaply), but that would be done in a different function...
And we could use ctz to find the power of two...

2020-12-01  Jakub Jelinek  

PR rtl-optimization/97459
* optabs.c (expand_doubleword_mod): Punt early for even op1.
(expand_binop): Don't require lshr_optab double-word handler.

[Bug rtl-optimization/97954] [11 Regression] ICE in maybe_record_trace_start, at dwarf2cfi.c:2360

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97954

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Jakub Jelinek :

https://gcc.gnu.org/g:404d0ca7820bbf258e2edfac423403ee31b48a7b

commit r11-5613-g404d0ca7820bbf258e2edfac423403ee31b48a7b
Author: Jakub Jelinek 
Date:   Tue Dec 1 16:23:59 2020 +0100

loop-invariant: JUMP_INSNs aren't loop invariant [PR97954]

The following testcase ICEs because loop invariant motion moves asm goto
with a single output as invariant.
Normally, jumps aren't really moved, because if they are single set,
they have their SET_DEST (pc) and pc_rtx has VOIDmode on which one of the
functions find_invariant_insn calls bails out.  The code already punts on
insns that can throw or trap.  And for asm goto without outputs, it isn't
single set, or asm goto with two or more outputs it isn't single set
either.

2020-12-01  Jakub Jelinek  

PR rtl-optimization/97954
* loop-invariant.c (find_invariant_insn): Punt on JUMP_P insns.

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

[Bug ipa/98082] [11 Regression] ICE in set_rtl, at cfgexpand.c:178 since r11-3257-g225a08220e444371

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98082

Richard Biener  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org
  Component|rtl-optimization|ipa

--- Comment #5 from Richard Biener  ---
Note the GIMPLE we expand from looks weird:

struct GoodIterD.2094 operator+ (intD.9 D.2129, struct GoodIterD.2094 &
restrict D.2130)
{
   [local count: 1]:
  *_2(D) = operator- (_3(D), _4(D)); [return slot optimization] [tail call]
  return _2(D);

somehow the inlined(?) thunk has some indirection exposed and the RSO
looks misplaced.

[Bug rtl-optimization/98082] [11 Regression] ICE in set_rtl, at cfgexpand.c:178 since r11-3257-g225a08220e444371

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98082

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-*-*

--- Comment #4 from Richard Biener  ---
Fuzzing is a way to feed valid GIMPLE / RTL to optimizers that is either
difficult to generate otherwise or for which we have no test coverage.

(gdb) p debug_rtx (x)
(reg/f:DI 82 [ .result_ptr ])

(gdb) p use_register_for_decl (t)
$5 = false

(gdb) p debug_tree (t)
 
def_stmt GIMPLE_NOP
version:2>

we're expecting a MEM for t.

[Bug rtl-optimization/98082] [11 Regression] ICE in set_rtl, at cfgexpand.c:178 since r11-3257-g225a08220e444371

2020-12-01 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98082

--- Comment #3 from Eric Botcazou  ---
> It's an option fuzzing.

OK, but let's please do that in a smarter way and avoid nonsense like this.

[Bug ipa/94947] [8 Regression] -fipa-pta + pthread_once crash since r6-5684-g47e5754e17e9ac3b

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94947

Richard Biener  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED
  Known to fail||8.4.0
  Known to work||8.4.1

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

[Bug tree-optimization/94964] [8 Regression] ICE in add_phi_arg, at tree-phinodes.c:359 since r8-2993-ga7976089dba5e227

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94964

Richard Biener  changed:

   What|Removed |Added

  Known to fail||8.4.0
 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED
  Known to work||8.4.1

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

[Bug tree-optimization/95133] [8 Regression] ICE in gimple_redirect_edge_and_branch_force, at tree-cfg.c:6075

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95133

Richard Biener  changed:

   What|Removed |Added

  Known to work||8.4.1
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
  Known to fail||8.4.0

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

[Bug tree-optimization/94964] [8 Regression] ICE in add_phi_arg, at tree-phinodes.c:359 since r8-2993-ga7976089dba5e227

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94964

--- Comment #6 from CVS Commits  ---
The releases/gcc-8 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:70ac96884811b6971b44a7ffa94d637f612e6cc4

commit r8-10660-g70ac96884811b6971b44a7ffa94d637f612e6cc4
Author: Richard Biener 
Date:   Wed May 6 10:23:15 2020 +0200

middle-end/94964 - avoid EH loop entry with CP_SIMPLE_PREHEADERS

Loop optimizers expect to be able to insert on the preheader
edge w/o splitting it thus avoid ending up with a preheader
that enters the loop via an EH edge (or an abnormal edge).

2020-05-06  Richard Biener  

PR middle-end/94964
* cfgloopmanip.c (create_preheader): Require non-complex
preheader edge for CP_SIMPLE_PREHEADERS.

(cherry picked from commit 6fc00b41e764219e2c88d8892d7c701c0d292a17)

[Bug ipa/94947] [8 Regression] -fipa-pta + pthread_once crash since r6-5684-g47e5754e17e9ac3b

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94947

--- Comment #13 from CVS Commits  ---
The releases/gcc-8 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:3114be1ceb750f323a13dad0a419a7622bd71fbe

commit r8-10662-g3114be1ceb750f323a13dad0a419a7622bd71fbe
Author: Richard Biener 
Date:   Thu May 7 14:06:02 2020 +0200

ipa/94947 - avoid using externally_visible_p ()

externally_visible_p wasn't the correct predicate to use (even if it
worked), instead we should use DECL_EXTERNAL || TREE_PUBLIC.

2020-05-07  Richard Biener  

PR ipa/94947
* tree-ssa-structalias.c (refered_from_nonlocal_fn): Use
DECL_EXTERNAL || TREE_PUBLIC instead of externally_visible.
(refered_from_nonlocal_var): Likewise.
(ipa_pta_execute): Likewise.

(cherry picked from commit b9250b3cb91b667cd67943e0fac94bf39ac089a8)

[Bug ipa/94947] [8 Regression] -fipa-pta + pthread_once crash since r6-5684-g47e5754e17e9ac3b

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94947

--- Comment #12 from CVS Commits  ---
The releases/gcc-8 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:1cd95acac5a521937b205ace0db3f1a042561dd8

commit r8-10661-g1cd95acac5a521937b205ace0db3f1a042561dd8
Author: Richard Biener 
Date:   Tue May 5 13:09:50 2020 +0200

ipa/94947 - fix test for externally visible variables for IPA PTA

This fixes lack of an escape point of externally declared variables.

2020-05-05  Richard Biener  

PR ipa/94947
* tree-ssa-structalias.c (ipa_pta_execute): Use
varpool_node::externally_visible_p ().
(refered_from_nonlocal_var): Likewise.

* gcc.dg/torture/pr94947-1.c: New testcase.
* gcc.dg/torture/pr94947-2.c: Likewise.

(cherry picked from commit f9b5db750bc7fbba69fee93564907f7da1bca35f)

[Bug tree-optimization/95133] [8 Regression] ICE in gimple_redirect_edge_and_branch_force, at tree-cfg.c:6075

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95133

--- Comment #9 from CVS Commits  ---
The releases/gcc-8 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:3d0da0bc398054f2c37f09b13ccf7e2e2ef63b22

commit r8-10659-g3d0da0bc398054f2c37f09b13ccf7e2e2ef63b22
Author: Richard Biener 
Date:   Fri May 15 09:38:54 2020 +0200

tree-optimization/95133 - avoid abnormal edges in path splitting

When path splitting tries to detect a CFG diamond make sure it
is composed of normal (non-EH, not abnormal) edges.  Otherwise
CFG manipulation later may fail.

2020-05-15  Richard Biener  

PR tree-optimization/95133
* gimple-ssa-split-paths.c
(find_block_to_duplicate_for_splitting_paths): Check for
normal edges.

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

(cherry picked from commit aaf1ee48316f9b414b11c17e298198925d816595)

[Bug rtl-optimization/98082] [11 Regression] ICE in set_rtl, at cfgexpand.c:178 since r11-3257-g225a08220e444371

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98082

--- Comment #2 from Martin Liška  ---
It's an option fuzzing.

[Bug rtl-optimization/98082] [11 Regression] ICE in set_rtl, at cfgexpand.c:178 since r11-3257-g225a08220e444371

2020-12-01 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98082

--- Comment #1 from Eric Botcazou  ---
What's the point of using -fipa-icf at -O0 exactly?  P1 for this...

[Bug rtl-optimization/98082] [11 Regression] ICE in set_rtl, at cfgexpand.c:178 since r11-3257-g225a08220e444371

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98082

Martin Liška  changed:

   What|Removed |Added

   Target Milestone|--- |11.0
   Last reconfirmed||2020-12-01
  Known to fail||11.0
   Priority|P3  |P1
  Known to work||10.2.0
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

[Bug rtl-optimization/98082] New: [11 Regression] ICE in set_rtl, at cfgexpand.c:178 since r11-3257-g225a08220e444371

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98082

Bug ID: 98082
   Summary: [11 Regression] ICE in set_rtl, at cfgexpand.c:178
since r11-3257-g225a08220e444371
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: ebotcazou at gcc dot gnu.org
  Target Milestone: ---

The following fails:

$ cat x.cpp
class GoodIter {
public:
  GoodIter();
  GoodIter(GoodIter &);
};
GoodIter operator-(int, GoodIter) { return GoodIter(); }
GoodIter operator+(int, GoodIter) { return GoodIter(); }

$ g++ -fipa-icf x.cpp -c -std=c++20
during RTL pass: expand
x.cpp: In function ‘GoodIter operator+(int, GoodIter)’:
x.cpp:7:10: internal compiler error: in set_rtl, at cfgexpand.c:178
7 | GoodIter operator+(int, GoodIter) { return GoodIter(); }
  |  ^~~~
0x71000d set_rtl
/home/marxin/Programming/gcc/gcc/cfgexpand.c:178
0xbc613e set_parm_rtl(tree_node*, rtx_def*)
/home/marxin/Programming/gcc/gcc/cfgexpand.c:1400
0xd51671 assign_parms
/home/marxin/Programming/gcc/gcc/function.c:3760
0xd53ec7 expand_function_start(tree_node*)
/home/marxin/Programming/gcc/gcc/function.c:5135
0xbd3f5b execute
/home/marxin/Programming/gcc/gcc/cfgexpand.c:6612
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++/98077] C++ 17: Using alias template bug in gcc

2020-12-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98077

--- Comment #3 from Jonathan Wakely  ---
Reduced:


template T&& declval();

template struct function
{
  template function(T) { }
};

template function(T) -> function()())>;

template constexpr bool is_void_v = false;
template<> constexpr bool is_void_v = true;

template 
struct CallableTrait;

template 
struct CallableTrait>
{
using ReturnType = R;
};

template 
using CallableTraitT = CallableTrait()})>;

template 
auto test(Callable&&)
{
using CallableInfo = CallableTraitT;
static_assert(!is_void_v);
}

int main()
{
test([]() { return 42; });
}



98077.C: In instantiation of ‘auto test(Callable&&) [with Callable =
main()::]’:
98077.C:34:29:   required from here
98077.C:29:20: error: invalid use of incomplete type ‘struct
CallableTrait >’
   29 | static_assert(!is_void_v);
  |^~~~
98077.C:14:8: note: declaration of ‘struct CallableTrait >’
   14 | struct CallableTrait;
  |^

[Bug c++/98077] C++ 17: Using alias template bug in gcc

2020-12-01 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98077

Jonathan Wakely  changed:

   What|Removed |Added

 Status|WAITING |NEW
   Keywords||rejects-valid

--- Comment #2 from Jonathan Wakely  ---
The testcase from the godbolt link is:

// { dg-options "-std=gnu++17" }
#include 

template 
struct CallableTrait;

template 
struct CallableTrait>
{
using ReturnType = R;
};

template 
using CallableTraitT =
CallableTrait()})>;

template 
auto test(Callable&&)
{
using CallableInfo = CallableTraitT;
static_assert(!std::is_void_v);
}

int main()
{
test([]() { return 42; });
}


It requires at least C++17.

[Bug testsuite/98036] gcc.target/i386/xop-hsubX.c is broken

2020-12-01 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98036

Uroš Bizjak  changed:

   What|Removed |Added

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

--- Comment #9 from Uroš Bizjak  ---
.

[Bug testsuite/98036] gcc.target/i386/xop-hsubX.c is broken

2020-12-01 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98036

--- Comment #8 from Uroš Bizjak  ---
Fixed by the above change for gcc-10 and gcc-11.

(I don't know why cvs-commit hook hates my commits...)

[Bug testsuite/98036] gcc.target/i386/xop-hsubX.c is broken

2020-12-01 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98036

--- Comment #7 from Uroš Bizjak  ---
https://gcc.gnu.org/g:67138ea1b041fe1637da6b3568f064f172d9358c

commit r11-5501-g67138ea1b041fe1637da6b3568f064f172d9358c
Author: Uros Bizjak 
Date:   Fri Nov 27 18:41:56 2020 +0100

testsuite/i386: Fix XOP and FMA4 checking functions [PR98036].

Add missing returns and remove unnecessary postfix increments.

2020-11-27  Uroš Bizjak  

PR testsuite/98036

gcc/testsuite/
* gcc.target/i386/fma4-256-maccXX.c (check_maccps):
Remove unnecessary postfix increment on a returned variable.
(check_maccpd): Ditto.
* gcc.target/i386/fma4-256-msubXX.c (check_msubps): Ditto.
(check_msubpd): Ditto.
* gcc.target/i386/fma4-256-nmaccXX.c (check_nmaccps): Ditto.
(check_nmaccpd): Ditto.
* gcc.target/i386/fma4-256-nmsubXX.c (check_nmsubps): Ditto.
(check_nmsubpd): Ditto.
* gcc.target/i386/fma4-maccXX.c (check_maccps): Ditto.
(check_maccpd): Ditto.
(check_maccss): Ditto.
(check_maccsd): Ditto.
* gcc.target/i386/fma4-msubXX.c (check_msubps): Ditto.
(check_msubpd): Ditto.
(check_msubss): Ditto.
(check_msubsd): Ditto.
* gcc.target/i386/fma4-nmaccXX.c (check_nmaccps): Ditto.
(check_nmaccpd): Ditto.
(check_nmaccss): Ditto.
(check_nmaccsd): Ditto.
* gcc.target/i386/fma4-nmsubXX.c (check_nmsubps): Ditto.
(check_nmsubpd): Ditto.
(check_nmsubss): Ditto.
(check_nmsubsd): Ditto.
* gcc.target/i386/xop-haddX.c (check_sbyte2word): Add missing
return.
(check_sbyte2dword):
Remove unnecessary postfix increment on a returned value.
(check_sbyte2qword): Ditto.
(check_sword2dword): Add missing return.
(check_sword2qword):
Remove unnecessary postfix increment on a returned value.
(check_dword2qword): Add missing return.
* gcc.target/i386/xop-hadduX.c (check_byte2word): Add missing
return.
(check_byte2dword):
Remove unnecessary postfix increment on a returned value.
(check_byte2qword): Ditto.
(check_word2dword): Add missing return.
(check_word2qword):
Remove unnecessary postfix increment on a returned value.
(check_word2qword): Add missing return.
* gcc.target/i386/xop-hsubX.c (check_sbyte2word): Add missing
return.
(check_sword2dword): Ditto.
(check_sword2qword): Ditto.

[Bug middle-end/98070] [11 Regression] errno is not re-evaluated after clearing errno and calling realloc(ptr, SIZE_MAX)

2020-12-01 Thread stli at linux dot ibm.com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98070

--- Comment #5 from stli at linux dot ibm.com  ---
I've just build and run the attached test on s390x/x86_64 with your fix.
Now errno is re-evaluated after realloc.

I've also rebuild glibc on s390x and the original glibc-test
/malloc/tst-malloc-too-large.c is now also passing.

Many thanks.

[Bug target/98079] [11 Regression] ICE in extract_insn, at recog.c:2315 since r11-5429-gacdf30d66cac1175

2020-12-01 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98079

Uroš Bizjak  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ubizjak at gmail dot com

--- Comment #2 from Uroš Bizjak  ---
Created attachment 49660
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49660=edit
Proposed patch

[Bug tree-optimization/97764] [10/11 Regression] wrong code at -O1 and above on x86_64-pc-linux-gnu since r10-6809

2020-12-01 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97764

Jakub Jelinek  changed:

   What|Removed |Added

 CC||haoxintu at gmail dot com

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

[Bug tree-optimization/98074] [9/10 Regression] C Wrong code at O2~Os

2020-12-01 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98074

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org
 Resolution|--- |DUPLICATE
 Status|WAITING |RESOLVED
  Known to work|10.2.1, 9.3.1   |

--- Comment #3 from Jakub Jelinek  ---
I can reproduce, on the trunk stopped being miscompiled with
r11-4867-gc69325a5db450dbac198f76f1162734af05a1061
and that fix has been backported in
r10-8998-g4b47f86c40a071fbcad5bce5001b1b689748a2e8
Therefore, marking as dup.

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

[Bug ipa/88702] [8/9/10/11 regression] We do terrible job optimizing IsHTMLWhitespace from Firefox

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88702

--- Comment #13 from Martin Liška  ---
All right, this test-case will need one more small tweak.
I've got a patch candidate.

[Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug testsuite/98036] gcc.target/i386/xop-hsubX.c is broken

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98036

--- Comment #6 from Richard Biener  ---
Seems to help.

[Bug testsuite/98002] gcc.dg/strncmp-2.c frees mproptected memory

2020-12-01 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98002

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug testsuite/98002] gcc.dg/strncmp-2.c frees mproptected memory

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98002

--- Comment #4 from CVS Commits  ---
The releases/gcc-8 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:427fe143a43ba13497759e1482ce683deed9a00b

commit r8-10658-g427fe143a43ba13497759e1482ce683deed9a00b
Author: Richard Biener 
Date:   Thu Nov 26 10:07:06 2020 +0100

testsuite/98002 - fix gcc.dg/strncmp-2.c

This makes sure not to free() memory we have mprotected to PROT_NONE
by calling mprotect again with PROT_READ|PROT_WRITE.  This avoids
crashing the allocator when in debug mode.

2020-11-16  Richard Biener  

PR testsuite/98002
* gcc.dg/strncmp-2.c: Call mprotect again before free.

(cherry picked from commit 5b3a8fad18324cd38c221bdb0ae2b690fc82ede0)

[Bug rtl-optimization/97554] ICE: during RTL pass: cprop /segfault in sbitmap

2020-12-01 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97554

--- Comment #8 from CVS Commits  ---
The releases/gcc-8 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:46384dc73076d945c9222b3f0850a9aa3e694eda

commit r8-10657-g46384dc73076d945c9222b3f0850a9aa3e694eda
Author: Richard Biener 
Date:   Mon Oct 26 10:10:46 2020 +0100

middle-end/97554 - avoid overflow in alloc size compute

This avoids overflow in the allocation size computations in
sbitmap_vector_alloc when the result exceeds 2GB.

2020-10-26  Richard Biener  

PR middle-end/97554
* sbitmap.c (sbitmap_vector_alloc): Use size_t for byte
quantities to avoid overflow.

(cherry picked from commit 50f9e1f4d458e36d306b2449c689e45492847f68)

[Bug fortran/98016] Host association problem

2020-12-01 Thread drikosev at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98016

--- Comment #7 from Ev Drikos  ---
Created attachment 49659
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49659=edit
attachment for pr98016-07

(In reply to Paul Thomas from comment #6)
> Created attachment 49645 [details]
> Fix for the PR
> 
> Unless there are objections, ...

Not an objection, rather just an observation:

1. This code is inside "resolve_symbol" and the
   following double declaration seems redundant:

   bool saved_specification_expr

   The reason I'm mentioning it is that I debugged
   the example with gcc-4.8 and the debugger makes
   this call:

   gfc_resolve_array_spec (sym->as, check_constant)

   So, the declaration below could be at the top of
   the function declarations like the code below

[Bug tree-optimization/14799] [tree-ssa] convert a sequence of "if"s to a "switch" statement

2020-12-01 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=14799

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #8 from Martin Liška  ---
Implemented in master.

  1   2   >