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

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

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
Summary|errno is not re-evaluated   |[11 Regression] errno is
   |after clearing errno and|not re-evaluated after
   |calling realloc(ptr,|clearing errno and calling
   |SIZE_MAX)   |realloc(ptr, SIZE_MAX)
   Target Milestone|--- |11.0
 CC||hubicka at gcc dot gnu.org
 Ever confirmed|0   |1
   Last reconfirmed||2020-12-01
   Keywords||wrong-code

--- Comment #2 from Richard Biener  ---
Likely caused by

  /* Realloc serves both as allocation point and deallocation point.  */
  case BUILT_IN_REALLOC:
return ".cw ";

which should be ".Cw "

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

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

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |11.0

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

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||needs-bisection
  Known to work||10.2.1, 9.3.1
 Status|UNCONFIRMED |NEW
  Known to fail||10.2.0
   Target Milestone|--- |10.3
 Ever confirmed|0   |1
   Last reconfirmed||2020-12-01

--- Comment #1 from Richard Biener  ---
It's not so easy, it's also possible the bug just got latent.  We'd have to see
what "fixed" it.  Note I cannot reproduce on the GCC 10/9 branches on
x86_64-linux,
so it's likely fixed and has a duplicate.  Confirmed for 10.2.0 though.

[Bug ipa/98075] [10/11 Regression] ICE: verify_cgraph_node failed (error: malloc attribute should be used for a function that returns a pointer)

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

Richard Biener  changed:

   What|Removed |Added

   Keywords||ice-checking
   Target Milestone|--- |10.3

[Bug tree-optimization/98069] [8/9/10/11 Regression] Miscompilation with -O3 since r8-2380-g2d7744d4ef93bfff

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

--- Comment #2 from Richard Biener  ---
The following fails with -O2 -ftree-vectorize


long long int var_3 = -166416893043554447LL;
short var_8 = (short)27092;
unsigned int var_17 = 75036300U;
short arr_165[23];

static long c(long e, long f) { return f ? e : f; }
void __attribute((noipa)) test()
{
  for (int b = 0; b < 19; b = var_17)
for (int d = (int)(~c(-2147483647 - 1, var_3)) - 2147483647; d < 22; d++)
  arr_165[d] = var_8;
}

int main()
{
  for (unsigned i_3 = 0; i_3 < 23; ++i_3)
arr_165[i_3] = (short)-8885;
  test();
  if (arr_165[0] != 27092)
__builtin_abort ();
  return 0;
}

[Bug tree-optimization/98069] [8/9/10/11 Regression] Miscompilation with -O3 since r8-2380-g2d7744d4ef93bfff

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

Richard Biener  changed:

   What|Removed |Added

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

[Bug debug/97989] -g3 somehow breaks -E

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

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

https://gcc.gnu.org/g:934a54180541d27139aecbd19e7f50cb73552c7c

commit r11-5596-g934a54180541d27139aecbd19e7f50cb73552c7c
Author: Jakub Jelinek 
Date:   Tue Dec 1 09:39:04 2020 +0100

driver: Don't imply -dD for -g3 -g0 [PR97989]

The driver enables -dD when preprocessing when -g3 is specified, for
obvious reasons
that we need the macros to be preserved somewhere for them to make up the
debug
info.  But it enables it even if -g3 is later overridden to -g2, -g1 or
-g0,
where we in the end don't emit .debug_mac{ros,info}.

The following patch passes -dD only if we'll need it.

2020-12-01  Jakub Jelinek  

PR debug/97989
* gcc.c (cpp_unique_options): Add -dD if %:debug-level-gt(2)
rather than g3|ggdb3|gstabs3|gxcoff3|gvms3.

* gcc.dg/cpp/pr97989-1.c: New test.
* gcc.dg/cpp/pr97989-2.c: New test.

[Bug debug/97989] -g3 somehow breaks -E

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

Jakub Jelinek  changed:

   What|Removed |Added

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

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

[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 jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords|ice-on-invalid-code |ice-checking
 CC||jakub at gcc dot gnu.org,
   ||tschwinge at gcc dot gnu.org
   Priority|P3  |P1
Summary|[11 Regression] ICE in  |[9/10/11 Regression] ICE in
   |cp_parser_omp_var_list_no_o |cp_parser_omp_var_list_no_o
   |pen, at cp/parser.c:34843   |pen, at cp/parser.c:34843

--- Comment #1 from Jakub Jelinek  ---
ICEs even when the testcase is turned into valid one:

typedef struct __attribute__((__aligned__ (sizeof (void * omp_depend_t {
  char __omp_depend_t__[2 * sizeof (void *)];
} omp_depend_t;

void
foo (int *x, omp_depend_t *y, int z)
{
#pragma omp depobj (*y) depend (in: x[z])
}

Started with 
r11-5430-gc0c7270cc4efd896fe99f8ad5409dbef089a407f but that change has been
backported to 10 and 9 branches too.

[Bug rtl-optimization/82576] sbitmap_vector_alloc() not ready for 64 bits

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

dominik.stras...@onespin-solutions.com changed:

   What|Removed |Added

 CC||dominik.strasser@onespin-so
   ||lutions.com

--- Comment #3 from dominik.stras...@onespin-solutions.com ---
Still occurs in gcc 10.x

[Bug tree-optimization/98069] [8/9/10/11 Regression] Miscompilation with -O3 since r8-2380-g2d7744d4ef93bfff

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

Richard Biener  changed:

   What|Removed |Added

 CC||rsandifo at gcc dot gnu.org

--- Comment #3 from Richard Biener  ---
So before vectorization we have

  var_3.0_1 = var_3;
  iftmp.3_10 = var_3.0_1 != 0 ? -2147483648 : 0;
  _2 = (int) iftmp.3_10;
  d_11 = -2147483648 - _2;

which should compute to 0.  Now somewhere (split_constant_offset I'd bet)
things go wrong and we produce in dataref analysis

base_address: &arr_165
offset from base address: (ssizetype) ((sizetype) -_2 * 2)
constant offset from base address: -4294967296
step: 2
base alignment: 32
base misalignment: 0
offset alignment: 2
step alignment: 2
base_object: arr_165
Access function 0: {d_11, +, 1}_2

from { ((sizetype) d_21) * 2, +, 2 }_2 as offset IV which split_constant_offset
makes into { (sizetype) -_2 * 2, +, 2 }_2 + -4294967296.

The logic is that we can dive into the (sizetype) extension from int since
the operation on int cannot overflow (undefined behavior).  We then
strip the -2147483648 constant, thinking we can associate this as
(sizetype)(0 - _2) + -2147483648 but of course 0 - _2 now overflows
and we happily fold it to -_2.  So here:

static bool
split_constant_offset_1 (tree type, tree op0, enum tree_code code, tree op1,
 tree *var, tree *off,
 hash_map > &cache,
 unsigned *limit)
{
...
case PLUS_EXPR:
case MINUS_EXPR:
  if (TREE_CODE (op1) == INTEGER_CST)
{
  split_constant_offset (op0, &var0, &off0, cache, limit);
  *var = var0;
  *off = size_binop (ocode, off0, fold_convert (ssizetype, op1));
  return true;
}
  split_constant_offset (op0, &var0, &off0, cache, limit);
  split_constant_offset (op1, &var1, &off1, cache, limit);
  *var = fold_build2 (code, type, var0, var1);

we have to make sure that the expression we fold cannot overflow or
use unsigned arithmetic.  In fact, using unsigned arithmetic looks like
the only reasonable thing since splitting out any constant is not
trivially valid.  We're doing

 (var0 + off0) +- (var1 + off1) -> (var0 +- var1) + (off0 + off1)

where we know the left side doesn't overflow.

This makes associating across the multiplication invalid where we do

 ((sizetype) (A +- B)) * 2 -> ((sizetype) A) * 2 +- B * 2

and thus from 0 * 2 we go to -2147483648 * 2 + -4294967296.  Using
unsigned arithmetic to make the inner op no longer undefined doesn't
help here.

So it looks like we cannot use TYPE_OVERFLOW_UNDEFINED to validate
looking across widening conversions.  Which points to the same area
as PR97960.

[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 jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #2 from Jakub Jelinek  ---
Created attachment 49656
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49656&action=edit
gcc11-pr98072.patch

Untested fix.  The ultimate right fix is of course get rid of these sentinels
from OpenMP/OpenACC parsing and deal with location wrappers when handling the
clauses.

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

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

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Richard Biener :

https://gcc.gnu.org/g:57fcbe579c2f2b0919486b658a5bec8f4e1ef42b

commit r11-5598-g57fcbe579c2f2b0919486b658a5bec8f4e1ef42b
Author: Richard Biener 
Date:   Tue Dec 1 09:19:52 2020 +0100

middle-end/98070 - fix realloc builtin fnspec

realloc clobbers errno, note that.

2020-12-01  Richard Biener  

PR middle-end/98070
* builtins.c (builtin_fnspec): realloc is ".Cw ".

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

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

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug target/98063] Emit R_X86_64_GOTOFF64 instead of R_X86_64_GOTPCRELX for -mcmodel=large -fno-plt

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

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

https://gcc.gnu.org/g:69157fe75823fc34f1e3265345f2d2b99cd8d380

commit r11-5599-g69157fe75823fc34f1e3265345f2d2b99cd8d380
Author: Jakub Jelinek 
Date:   Tue Dec 1 10:44:40 2020 +0100

x86_64: Fix up -fpic -mcmodel=large -fno-plt [PR98063]

On the following testcase with -fpic -mcmodel=large -fno-plt we emit
call puts@GOTPCREL(%rip)
but that is not really appropriate for CM_LARGE_PIC, the .text can be
larger
than 2GB in that case and the .got slot further away from %rip than what
can
fit into the signed 32-bit immediate.

The following patch computes the address of the .got slot the way it is
computed for that model for function pointer loads, and calls that.

2020-12-01  Jakub Jelinek  

PR target/98063
* config/i386/i386-expand.c (ix86_expand_call): Handle non-plt
CM_LARGE_PIC calls.

* gcc.target/i386/pr98063.c: New test.

[Bug ipa/98078] New: ICE in cgraph_add_edge_to_call_site_hash, at cgraph.c:698 since r6-1705-gd88511aec7338a93

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

Bug ID: 98078
   Summary: ICE in cgraph_add_edge_to_call_site_hash, at
cgraph.c:698 since r6-1705-gd88511aec7338a93
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marxin at gcc dot gnu.org
CC: jason at redhat dot com, marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 49657
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49657&action=edit
test-case

Reduced from dhewm3 package:

$ g++ [12].ii -O2 -flto
1.ii:71:8: warning: ‘void::FindModel(char*)’ used but never
defined
   71 |   void FindModel(char *);
  |^
2.ii:10:7: warning: type ‘struct idDeclFX’ violates the C++ One Definition Rule
[-Wodr]
   10 | class idDeclFX : idDecl {
  |   ^
1.ii:78:7: note: a type with the same name but different number of polymorphic
bases is defined in another translation unit
   78 | class idDeclFX {
  |   ^
2.ii:2:7: note: the extra base is defined here
2 | class idDecl {
  |   ^
during IPA pass: inline
1.ii: In member function ‘ParseSingleFXAction.constprop’:
1.ii:165:24: internal compiler error: in cgraph_add_edge_to_call_site_hash, at
cgraph.c:724
  165 | ParseSingleFXAction(src, action);
  |^
0x6099ff cgraph_add_edge_to_call_site_hash
/home/marxin/Programming/gcc/gcc/cgraph.c:724
0x60a7c9 cgraph_add_edge_to_call_site_hash
/home/marxin/Programming/gcc/gcc/tree.h:3331
0x60a7c9 cgraph_edge::set_call_stmt(cgraph_edge*, gcall*, bool)
/home/marxin/Programming/gcc/gcc/cgraph.c:855
0x87c0af cgraph_edge::set_call_stmt(cgraph_edge*, gcall*, bool)
/home/marxin/Programming/gcc/gcc/cgraph.c:820
0x87c39a cgraph_update_edges_for_call_stmt(gimple*, tree_node*, gimple*)
/home/marxin/Programming/gcc/gcc/cgraph.c:1710
0xd35c4c fold_marked_statements
/home/marxin/Programming/gcc/gcc/tree-inline.c:5380
0xd476f7 tree_function_versioning(tree_node*, tree_node*, vec*, ipa_param_adjustments*, bool, bitmap_head*,
basic_block_def*)
/home/marxin/Programming/gcc/gcc/tree-inline.c:6412
0x88aeb8 cgraph_node::materialize_clone()
/home/marxin/Programming/gcc/gcc/cgraphclones.c:1131
0x879485 cgraph_node::get_untransformed_body()
/home/marxin/Programming/gcc/gcc/cgraph.c:3899
0xd43e57 expand_call_inline
/home/marxin/Programming/gcc/gcc/tree-inline.c:4842
0xd467f1 gimple_expand_calls_inline
/home/marxin/Programming/gcc/gcc/tree-inline.c:5280
0xd467f1 optimize_inline_calls(tree_node*)
/home/marxin/Programming/gcc/gcc/tree-inline.c:5453
0xaa32eb inline_transform(cgraph_node*)
/home/marxin/Programming/gcc/gcc/ipa-inline-transform.c:790
0xbeaeef execute_one_ipa_transform_pass
/home/marxin/Programming/gcc/gcc/passes.c:2287
0xbeaeef execute_all_ipa_transforms(bool)
/home/marxin/Programming/gcc/gcc/passes.c:2334
0x8854ad cgraph_node::expand()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:1822
0x886a0f expand_all_functions
/home/marxin/Programming/gcc/gcc/cgraphunit.c:1997
0x886a0f symbol_table::compile()
/home/marxin/Programming/gcc/gcc/cgraphunit.c:2361
0x7d9e75 lto_main()
/home/marxin/Programming/gcc/gcc/lto/lto.c:653
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status

[Bug ipa/98078] ICE in cgraph_add_edge_to_call_site_hash, at cgraph.c:698 since r6-1705-gd88511aec7338a93

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

--- Comment #1 from Martin Liška  ---
Created attachment 49658
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49658&action=edit
test-case 2

[Bug ipa/98078] ICE in cgraph_add_edge_to_call_site_hash, at cgraph.c:698 since r6-1705-gd88511aec7338a93

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

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #2 from Martin Liška  ---
Started with Jason's commit, but it would be related to an inlining change I
guess.

[Bug rtl-optimization/82576] sbitmap_vector_alloc() not ready for 64 bits

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

Richard Biener  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 Status|NEW |RESOLVED

--- Comment #4 from Richard Biener  ---
duplicate

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

[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

 CC||babokin at gmail dot com

--- Comment #4 from Richard Biener  ---
*** Bug 82576 has been marked as a duplicate of this bug. ***

[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

   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Status|RESOLVED|ASSIGNED
 Resolution|FIXED   |---

--- Comment #5 from Richard Biener  ---
Sure, will backport.

[Bug ipa/98075] [10/11 Regression] ICE: verify_cgraph_node failed (error: malloc attribute should be used for a function that returns a pointer) since r10-6699-g33351ff9faa21c4c

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

Martin Liška  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
  Known to fail||10.2.0, 11.0
  Known to work||9.3.0
   Last reconfirmed||2020-12-01
 Ever confirmed|0   |1
Summary|[10/11 Regression] ICE: |[10/11 Regression] ICE:
   |verify_cgraph_node failed   |verify_cgraph_node failed
   |(error: malloc attribute|(error: malloc attribute
   |should be used for a|should be used for a
   |function that returns a |function that returns a
   |pointer)|pointer) since
   ||r10-6699-g33351ff9faa21c4c
 Status|UNCONFIRMED |ASSIGNED

--- Comment #1 from Martin Liška  ---
Started with my r10-6699-g33351ff9faa21c4c.

[Bug ipa/97575] [11 Regression] ICE in try_make_edge_direct_simple_call, at ipa-prop.c:3671 or in propagate_controlled_uses, at ipa-prop.c:4073

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

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #4 from Martin Liška  ---
Fixed with r11-4385-g783dc02d89712f52.

[Bug c++/94932] [10/11 Regression] ICE in ovl_skip_hidden, at cp/tree.c:2292 since r10-8016-gbce54ed494fd0e61

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

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #4 from Martin Liška  ---
Fixed with r11-3603-gdfaa24c974bab4bc.

[Bug analyzer/98073] error: in can_merge_p, at analyzer/region-model.cc

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

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #1 from Martin Liška  ---
Fixed on master with r11-2694-g808f4dfeb3a95f50.

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

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

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |WAITING
 CC||marxin at gcc dot gnu.org

--- Comment #2 from Martin Liška  ---
I can't reproduce that anywhere.
Please attach the output of --verbose.

[Bug analyzer/98073] error: in can_merge_p, at analyzer/region-model.cc

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

--- Comment #2 from Martin Liška  ---
Reduced test-case:

struct ist {
  char ptr;
  long len
} __trans_tmp_1, http_update_host_authority;
http_update_host_sl_0_0_0;
http_update_host(const struct ist uri) {
  uri.len || uri.ptr;
  if (http_update_host_sl_0_0_0) {
http_update_host_authority = __trans_tmp_1;
!http_update_host_authority.len;
  } else
http_update_host_authority = uri;
}

[Bug ipa/98057] [11 Regression] ICE verify_cgraph_node failed since r11-4900-g4656461585bfd0b9

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

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

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

commit r11-5600-gcbc4ae2b263bced781a2d2d0cf0085d262040db6
Author: Martin Liska 
Date:   Mon Nov 30 13:07:27 2020 +0100

IPA: drop implicit_section again

As mentioned in the PR, since 4656461585bfd0b9 implicit_section
was not set to false when set_section was called with the argument
equal to NULL.

gcc/ChangeLog:

PR ipa/98057
* symtab.c (symtab_node::set_section_for_node): Drop
implicit_section if x_section is NULL.

gcc/testsuite/ChangeLog:

PR ipa/98057
* g++.dg/ipa/pr98057.C: New test.

[Bug ipa/98057] [11 Regression] ICE verify_cgraph_node failed since r11-4900-g4656461585bfd0b9

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

Martin Liška  changed:

   What|Removed |Added

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

--- Comment #6 from Martin Liška  ---
Fixed on master.

[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 #6 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:9d769cdde26d87043da0e1ffdee51010a71f49c2

commit r10-9098-g9d769cdde26d87043da0e1ffdee51010a71f49c2
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 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|UNCONFIRMED |WAITING
   Last reconfirmed||2020-12-01
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Please see https://gcc.gnu.org/bugs for the requested info.

[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 tschwinge at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98072

Thomas Schwinge  changed:

   What|Removed |Added

 CC||dmalcolm at gcc dot gnu.org

--- Comment #3 from Thomas Schwinge  ---
(In reply to Arseny Solokha from comment #0)
> g++-11.0.0-alpha20201129 snapshot
> (g:bb67ad5cff58a707aaae645d4f45a913d8511c86) ICEs when compiling the
> following testcase, reduced from test/OpenMP/depobj_ast_print.cpp from the
> clang 11.0.0 test suite, w/ -fopenmp:

Thanks for doing such testing.

> % g++-11.0.0 -fopenmp -c wmttbiko.cpp
> wmttbiko.cpp: In function 'void dh(int*, int, int)':
> wmttbiko.cpp:4:65: internal compiler error: in
> cp_parser_omp_var_list_no_open, at cp/parser.c:34843
> 4 | #pragma omp depobj (pm) depend (iterator (ca = 0 : *vp), in: vp[ca])
>   | ^~
> 0x9e4b1b cp_parser_omp_var_list_no_open
>   
> /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/
> gcc/cp/parser.c:34843
> 0x9ec406 cp_parser_omp_clause_depend
>   
> /var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201129/work/gcc-11-20201129/

> The failing assert has been introduced in
> g:c0c7270cc4efd896fe99f8ad5409dbef089a407f.

ACK, and that means (a) missing testsuite coverage, and (b) likely mis-handling
these clauses (at least concerning validity checking, diagnostics) -- so, I'm
glad that the 'assert' has found this additional case.

(In reply to Jakub Jelinek from comment #2)
> Created attachment 49656 [details]
> gcc11-pr98072.patch
> 
> Untested fix.

ACK.  I suggest you also add the standard source code comment that we use in
other similar places.


Alternatively (separate change), I wondered whether we might actually move the
sentinel into 'cp_parser_omp_var_list_no_open', supposing that's the one only
place where this matters?  (But I haven't verified that.)


> The ultimate right fix is of course get rid of these
> sentinels from OpenMP/OpenACC parsing and deal with location wrappers when
> handling the clauses.

ACK.  (Or, get rid of (this implementation of) these explicit location wrapper
nodes.  I understand the intention behind the location wrappers, but maybe this
should be implemented differently?)

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

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

Bug ID: 98079
   Summary: [11 Regression] ICE in extract_insn, at recog.c:2315
since r11-5429-gacdf30d66cac1175
   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: ubizjak at gmail dot com
  Target Milestone: ---
  Host: x86_64-linux-gnu
Target: x86_64-linux-gnu

I see the following ICE since r11-5429-gacdf30d66cac1175:

$ gcc /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/pr75964.c
-march=pentium3 -O2 -m32 -c
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/pr75964.c: In
function ‘abs8’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/pr75964.c:15:1:
error: unrecognizable insn:
   15 | }
  | ^
(insn 27 26 28 2 (set (reg/v:QI 84 [ x ])
(if_then_else:QI (ge (reg:CCGOC 17 flags)
(const_int 0 [0]))
(reg:QI 88)
(reg:QI 87)))
"/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/pr75964.c":9:7 -1
 (expr_list:REG_DEAD (reg:QI 88)
(expr_list:REG_DEAD (reg:QI 87)
(expr_list:REG_DEAD (reg:CCGOC 17 flags)
(nil)
during RTL pass: ira
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/torture/pr75964.c:15:1:
internal compiler error: in extract_insn, at recog.c:2315
0x6cedfd _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/marxin/Programming/gcc/gcc/rtl-error.c:108
0x6cee19 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/marxin/Programming/gcc/gcc/rtl-error.c:116
0x6cd3e0 extract_insn(rtx_insn*)
/home/marxin/Programming/gcc/gcc/recog.c:2315
0xc0c62f ira_remove_insn_scratches(rtx_insn*, bool, _IO_FILE*, rtx_def*
(*)(rtx_def*))
/home/marxin/Programming/gcc/gcc/ira.c:5234
0xc0d6bd remove_scratches
/home/marxin/Programming/gcc/gcc/ira.c:5278
0xc0d6bd ira
/home/marxin/Programming/gcc/gcc/ira.c:5583
0xc0d6bd execute
/home/marxin/Programming/gcc/gcc/ira.c:5945
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

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

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

Martin Liška  changed:

   What|Removed |Added

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

[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 #2 from CVS Commits  ---
The releases/gcc-10 branch has been updated by Richard Biener
:

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

commit r10-9099-gaf7bd9c22e114de74fa86ec6f40e336ca1319a50
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 libstdc++/98003] FAIL: 27_io/basic_syncbuf/sync_ops/1.cc (test for excess errors)

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

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:58f71a34c68711c4432b45086bfcccb78be7ace5

commit r11-5604-g58f71a34c68711c4432b45086bfcccb78be7ace5
Author: Jonathan Wakely 
Date:   Tue Dec 1 10:36:09 2020 +

libstdc++: Link test with libatomic if needed [PR 98003]

libstdc++-v3/ChangeLog:

PR libstdc++/98003
* testsuite/27_io/basic_syncbuf/sync_ops/1.cc: Add options for
libatomic.

[Bug libstdc++/98003] FAIL: 27_io/basic_syncbuf/sync_ops/1.cc (test for excess errors)

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

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #4 from Jonathan Wakely  ---
The test should pass now.

Does the HP-UX linker support something like GNU ld's --as-needed? I wonder if
it makes sense to make g++ always add -latomic when adding -lstdc++, or just
link libstdc++.so to libatomic unconditionally.

[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 #1 from Uroš Bizjak  ---
Have to disable expanders for TARGET_PARTIAL_REG_STALL.

[Bug c++/98080] New: Need 'auto_suppress_location_wrappers sentinel' in 'cp_parser_omp_scan_loop_body'?

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

Bug ID: 98080
   Summary: Need 'auto_suppress_location_wrappers sentinel' in
'cp_parser_omp_scan_loop_body'?
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: openmp
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tschwinge at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Do we need an 'auto_suppress_location_wrappers sentinel' in
'cp_parser_omp_scan_loop_body', given its 'cp_parser_omp_var_list' usage?

Similar to PR98072; found by code inspection, don't have testcase.

[Bug c++/98081] New: Need 'auto_suppress_location_wrappers sentinel' in 'cp_parser_omp_declare_target'?

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

Bug ID: 98081
   Summary: Need 'auto_suppress_location_wrappers sentinel' in
'cp_parser_omp_declare_target'?
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: openmp
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tschwinge at gcc dot gnu.org
CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Do we need an 'auto_suppress_location_wrappers sentinel' in
'cp_parser_omp_declare_target', given its 'cp_parser_omp_var_list' usage?

Similar to PR98072; found by code inspection, don't have testcase.

[Bug tree-optimization/94406] 503.bwaves_r is 11% slower on Zen2 CPUs than GCC 9 with -Ofast -march=native

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

Martin Jambor  changed:

   What|Removed |Added

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

--- Comment #7 from Martin Jambor  ---
Fixed, as can be seen at
https://lnt.opensuse.org/db_default/v4/SPEC/graph?plot.0=276.427.0&plot.1=398.427.0&plot.2=295.427.0&;

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

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

Bug 94406 Summary: 503.bwaves_r is 11% slower on Zen2 CPUs than GCC 9 with 
-Ofast -march=native
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94406

   What|Removed |Added

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

[Bug tree-optimization/14799] [tree-ssa] convert a sequence of "if"s to a "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=14799

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

https://gcc.gnu.org/g:03eb09292ef228d1d12b5168cdd748583b1f992a

commit r11-5605-g03eb09292ef228d1d12b5168cdd748583b1f992a
Author: Martin Liska 
Date:   Fri Aug 28 10:26:13 2020 +0200

Add if-chain to switch conversion pass.

gcc/ChangeLog:

PR tree-optimization/14799
PR ipa/88702
* Makefile.in: Add gimple-if-to-switch.o.
* dbgcnt.def (DEBUG_COUNTER): Add new debug counter.
* passes.def: Include new pass_if_to_switch pass.
* timevar.def (TV_TREE_IF_TO_SWITCH): New timevar.
* tree-pass.h (make_pass_if_to_switch): New.
* tree-ssa-reassoc.c (struct operand_entry): Move to the header.
(dump_range_entry): Move to header file.
(debug_range_entry): Likewise.
(no_side_effect_bb): Make it global.
* tree-switch-conversion.h (simple_cluster::simple_cluster):
Add inline for couple of functions in order to prevent error
about multiple defined symbols.
* gimple-if-to-switch.cc: New file.
* tree-ssa-reassoc.h: New file.

gcc/testsuite/ChangeLog:

PR tree-optimization/14799
PR ipa/88702
* gcc.dg/tree-ssa/pr96480.c: Disable if-to-switch conversion.
* gcc.dg/tree-ssa/reassoc-32.c: Likewise.
* g++.dg/tree-ssa/if-to-switch-1.C: New test.
* gcc.dg/tree-ssa/if-to-switch-1.c: New test.
* gcc.dg/tree-ssa/if-to-switch-2.c: New test.
* gcc.dg/tree-ssa/if-to-switch-3.c: New test.
* gcc.dg/tree-ssa/if-to-switch-4.c: New test.
* gcc.dg/tree-ssa/if-to-switch-5.c: New test.
* gcc.dg/tree-ssa/if-to-switch-6.c: New test.
* gcc.dg/tree-ssa/if-to-switch-7.c: New test.
* gcc.dg/tree-ssa/if-to-switch-8.c: New test.

[Bug ipa/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 #12 from CVS Commits  ---
The master branch has been updated by Martin Liska :

https://gcc.gnu.org/g:03eb09292ef228d1d12b5168cdd748583b1f992a

commit r11-5605-g03eb09292ef228d1d12b5168cdd748583b1f992a
Author: Martin Liska 
Date:   Fri Aug 28 10:26:13 2020 +0200

Add if-chain to switch conversion pass.

gcc/ChangeLog:

PR tree-optimization/14799
PR ipa/88702
* Makefile.in: Add gimple-if-to-switch.o.
* dbgcnt.def (DEBUG_COUNTER): Add new debug counter.
* passes.def: Include new pass_if_to_switch pass.
* timevar.def (TV_TREE_IF_TO_SWITCH): New timevar.
* tree-pass.h (make_pass_if_to_switch): New.
* tree-ssa-reassoc.c (struct operand_entry): Move to the header.
(dump_range_entry): Move to header file.
(debug_range_entry): Likewise.
(no_side_effect_bb): Make it global.
* tree-switch-conversion.h (simple_cluster::simple_cluster):
Add inline for couple of functions in order to prevent error
about multiple defined symbols.
* gimple-if-to-switch.cc: New file.
* tree-ssa-reassoc.h: New file.

gcc/testsuite/ChangeLog:

PR tree-optimization/14799
PR ipa/88702
* gcc.dg/tree-ssa/pr96480.c: Disable if-to-switch conversion.
* gcc.dg/tree-ssa/reassoc-32.c: Likewise.
* g++.dg/tree-ssa/if-to-switch-1.C: New test.
* gcc.dg/tree-ssa/if-to-switch-1.c: New test.
* gcc.dg/tree-ssa/if-to-switch-2.c: New test.
* gcc.dg/tree-ssa/if-to-switch-3.c: New test.
* gcc.dg/tree-ssa/if-to-switch-4.c: New test.
* gcc.dg/tree-ssa/if-to-switch-5.c: New test.
* gcc.dg/tree-ssa/if-to-switch-6.c: New test.
* gcc.dg/tree-ssa/if-to-switch-7.c: New test.
* gcc.dg/tree-ssa/if-to-switch-8.c: New test.

[Bug c++/98080] Need 'auto_suppress_location_wrappers sentinel' in 'cp_parser_omp_scan_loop_body'?

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

--- Comment #1 from Jakub Jelinek  ---
No.
The problem is only with clauses that allow array sections, i.e. mapping (map,
to, from) clauses, depend, *reduction.

[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 #7 from CVS Commits  ---
The releases/gcc-9 branch has been updated by Richard Biener
:

https://gcc.gnu.org/g:5005e6c2a8a8cacfd501fed16dc4ce3ee24e8b26

commit r9-9083-g5005e6c2a8a8cacfd501fed16dc4ce3ee24e8b26
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 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 #3 from CVS Commits  ---
The releases/gcc-9 branch has been updated by Richard Biener
:

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

commit r9-9084-gda7a7d4f0f978f7851efc9437501767e5cb30154
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 c++/98080] Need 'auto_suppress_location_wrappers sentinel' in 'cp_parser_omp_scan_loop_body'?

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

--- Comment #2 from Jakub Jelinek  ---
And, the wrapper hack never should be used when parsing body code (that would
severely affect diagnostics for any bugs in that code), it is tolerable only
when parsing clauses for short term.

[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.

[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&action=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 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 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 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/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 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 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 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 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 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&action=edit
Proposed patch

[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 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 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

Uroš Bizjak  changed:

   What|Removed |Added

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

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

[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 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 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 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] [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

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

[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 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 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 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 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 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 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 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 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 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/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 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 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 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 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/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/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 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/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 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 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.

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/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.

[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 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 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/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 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 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 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] [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.

  1   2   >