[Bug middle-end/39398] verify_flow_info failed

2020-08-06 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=39398

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #4 from Arseny Solokha  ---
Is it still an issue?

[Bug tree-optimization/96514] New: [9/10/11 Regression] ICE: verify_flow_info failed (error: control flow in the middle of basic block 3)

2020-08-06 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96514

Bug ID: 96514
   Summary: [9/10/11 Regression] ICE: verify_flow_info failed
(error: control flow in the middle of basic block 3)
   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: asolokha at gmx dot com
  Target Milestone: ---
Target: x86_64-pc-linux-gnu

gcc-11.0.0-alpha20200802 snapshot (g:6e46b3f3da5c03bc529b3690dd0995927feb9142)
ICEs when compiling the following testcase w/ -O1:

int __attribute__ ((pure, returns_twice))
r0 (void);

void
vy (int t7)
{
  while (t7 == 0)
r0 ();
}

void
qw (int t7)
{
  vy (t7);

  if (0)
r0 ();
}

void __attribute__ ((simd))
un (int t7)
{
  qw (t7);
  qw (t7);
}

% x86_64-pc-linux-gnu-gcc-11.0.0 -O1 -c sylqgldf.c
sylqgldf.c: In function 'un.simdclone.0':
sylqgldf.c:21:1: error: control flow in the middle of basic block 3
   21 | un (int t7)
  | ^~
during GIMPLE pass: ifcvt
sylqgldf.c:21:1: internal compiler error: verify_flow_info failed
0x917096 verify_flow_info()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/cfghooks.c:269
0xe15db4 checking_verify_flow_info
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/cfghooks.h:212
0xe15db4 cleanup_tree_cfg_noloop
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-cfgcleanup.c:1114
0xe163c8 cleanup_tree_cfg(unsigned int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-cfgcleanup.c:1165
0xe3db5c execute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-if-conv.c:3201
0xe3db5c execute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-if-conv.c:3170

[Bug tree-optimization/96491] New: [11 Regression] ICE: tree check: expected ssa_name, have integer_cst in add_phi_arg, at tree-phinodes.c:373

2020-08-05 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96491

Bug ID: 96491
   Summary: [11 Regression] ICE: tree check: expected ssa_name,
have integer_cst in add_phi_arg, at
tree-phinodes.c:373
   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: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200802 snapshot (g:6e46b3f3da5c03bc529b3690dd0995927feb9142)
ICEs when compiling the following testcase w/ -O1:

int rj;

void __attribute__ ((returns_twice))
da (void)
{
  rj = 1;
}

void
c5 (void)
{
  for (;;)
++rj;
}

void
ls (int kz)
{
  if (kz == 0)
{
  rj = 0;
  c5 ();
}

  da ();
  c5 ();
}

% gcc-11.0.0 -O1 -c qqdrbiy8.c
during GIMPLE pass: sink
qqdrbiy8.c: In function 'ls':
qqdrbiy8.c:17:1: internal compiler error: tree check: expected ssa_name, have
integer_cst in add_phi_arg, at tree-phinodes.c:373
   17 | ls (int kz)
  | ^~
0x707146 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree.c:9687
0x6be83b tree_check(tree_node*, char const*, int, char const*, tree_code)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree.h:3303
0x6be83b add_phi_arg(gphi*, tree_node*, edge_def*, unsigned int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-phinodes.c:373
0xf997e1 sink_common_stores_to_bb
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-ssa-sink.c:594
0xf997e1 sink_code_in_bb
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-ssa-sink.c:656
0xf98cea sink_code_in_bb
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-ssa-sink.c:743
0xf98cea sink_code_in_bb
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-ssa-sink.c:743
0xf9a5ce execute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/tree-ssa-sink.c:824

[Bug target/96448] New: ICE: maximum number of generated reload insns per insn achieved (90)

2020-08-03 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96448

Bug ID: 96448
   Summary: ICE: maximum number of generated reload insns per insn
achieved (90)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: powerpc-*-linux-gnu

Probably another invalid target issue, but still…

gcc-11.0.0-alpha20200802 snapshot (g:6e46b3f3da5c03bc529b3690dd0995927feb9142)
configured for a 32-bit BE powerpc target ICEs when compiling the following
testcase, extracted from test/CodeGen/x86-inline-asm-min-vector-width.c from
clang 10.0.1 test suite, w/ -mcpu=power10:

typedef long long __m256i __attribute__ ((vector_size (32)));

__m256i testYMMout(__m256i *p) {
  __m256i ymm0;
  __asm__("vmovdqu %1, %0" :"=v"(ymm0) : "m"(*(__m256i*)p));
  return ymm0;
}

% powerpc-e300c3-linux-gnu-gcc-11.0.0 -mcpu=power10 -w -c dcbvmywg.c
dcbvmywg.c: In function 'testYMMout':
dcbvmywg.c:5:3: note: the layout of aggregates containing vectors with 32-byte
alignment has changed in GCC 5
5 |   __asm__("vmovdqu %1, %0" :"=v"(ymm0) : "m"(*(__m256i*)p));
  |   ^~~
during RTL pass: reload
dcbvmywg.c:7:1: internal compiler error: maximum number of generated reload
insns per insn achieved (90)
7 | }
  | ^
0xc1ddd0 lra_constraints(bool)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/lra-constraints.c:4954
0xc07540 lra(_IO_FILE*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/lra.c:2415
0xbbea4c do_reload
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/ira.c:5525
0xbbea4c execute
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200802/work/gcc-11-20200802/gcc/ira.c:5711

[Bug tree-optimization/96424] New: ICE: verify_flow_info failed (error: wrong outgoing edge flags at end of bb 23); or ICE: Segmentation fault (in expand_omp_for_init_vars/contains_struct_check)

2020-08-02 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96424

Bug ID: 96424
   Summary: ICE: verify_flow_info failed (error: wrong outgoing
edge flags at end of bb 23); or ICE: Segmentation
fault (in
expand_omp_for_init_vars/contains_struct_check)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: openmp
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

1.

g++-11.0.0-alpha20200726 snapshot (g:39ddfef9a5c24acf6412236f52f6716c8e0ebc9e)
ICEs when compiling the following testcase, reduced from
libgomp/testsuite/libgomp.c/loop-18.c, w/ -fbranch-probabilities
-fnon-call-exceptions -fopenmp:

int
main ()
{
  int i, j;

#pragma omp for collapse (2)
  for (i = 0; i < 1; ++i)
for (j = 0; j <= i; ++j)
  {
  }

  return 0;
}

% g++-11.0.0 -fbranch-probabilities -fnon-call-exceptions -fopenmp -c
qr6y7wzi.c
qr6y7wzi.c: In function 'int main()':
qr6y7wzi.c:13:1: error: wrong outgoing edge flags at end of bb 23
   13 | }
  | ^
during IPA pass: profile
qr6y7wzi.c:13:1: internal compiler error: verify_flow_info failed
0xb80b56 verify_flow_info()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/cfghooks.c:269
0x105e7e7 checking_verify_flow_info
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/cfghooks.h:212
0x105e7e7 gimple_flow_call_edges_add
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-cfg.c:8622
0xf81fdd branch_prob(bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/profile.c:1099
0x10fe836 tree_profiling
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-profile.c:779
0x10fe836 execute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-profile.c:885

2.

Replacing <= w/ < yields the following instead:

--- qr6y7wzi.c
+++ #
@@ -5,7 +5,7 @@ main ()

 #pragma omp for collapse (2)
   for (i = 0; i < 1; ++i)
-for (j = 0; j <= i; ++j)
+for (j = 0; j < i; ++j)
   {
   }


% g++-11.0.0 -fbranch-probabilities -fnon-call-exceptions -fopenmp -c
qr6y7wzi.c
during GIMPLE pass: ompexp
qr6y7wzi.c: In function 'int main()':
qr6y7wzi.c:6:9: internal compiler error: Segmentation fault
6 | #pragma omp for collapse (2)
  | ^~~
0x1028baf crash_signal
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/toplev.c:328
0xec69ae contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree.h:3416
0xec69ae expand_omp_for_init_vars
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/omp-expand.c:2271
0xeccbe2 expand_omp_for_static_nochunk
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/omp-expand.c:4969
0xedc6b4 expand_omp_for
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/omp-expand.c:7421
0xedcb8a expand_omp
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/omp-expand.c:9691
0xede96c execute_expand_omp
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/omp-expand.c:9920

[Bug java/82263] java multilib -m32 version is using 64 bit include and lib, _GStaticAssertCompileTimeAssertion_0

2020-07-27 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82263

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #3 from Arseny Solokha  ---
Is this PR still relevant?

[Bug tree-optimization/30604] Unable to coalesce ssa_names and which are marked as MUST COALESCE

2020-07-27 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=30604

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #18 from Arseny Solokha  ---
Is this PR still relevant?

[Bug tree-optimization/96349] New: [10/11 Regression] ICE: SSA corruption (Unable to coalesce ssa_names 2 and 3 which are marked as MUST COALESCE.) [in fail_abnormal_edge_coalesce]

2020-07-27 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96349

Bug ID: 96349
   Summary: [10/11 Regression] ICE: SSA corruption (Unable to
coalesce ssa_names 2 and 3 which are marked as MUST
COALESCE.) [in fail_abnormal_edge_coalesce]
   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: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200726 snapshot (g:39ddfef9a5c24acf6412236f52f6716c8e0ebc9e)
ICEs when compiling the following testcase w/ -O3:

void __attribute__ ((returns_twice))
gr (void);

void
ib (void);

void
zg (void);

void
yw (int uz)
{
  gr ();

  for (;;)
if (uz != 0)
  {
uz = 0;
ib ();
  }
else
  zg ();
}

% gcc-11.0.0 -O3 -c kl7mlgao.c

Unable to coalesce ssa_names 2 and 3 which are marked as MUST COALESCE.
uz_2(ab) and  uz_3(ab)
during RTL pass: expand
kl7mlgao.c: In function 'yw':
kl7mlgao.c:11:1: internal compiler error: SSA corruption
   11 | yw (int uz)
  | ^~
0xedadfa fail_abnormal_edge_coalesce
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-ssa-coalesce.c:1003
0xedadfa coalesce_partitions
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-ssa-coalesce.c:1425
0xedadfa coalesce_ssa_name(_var_map*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-ssa-coalesce.c:1755
0xe78937 remove_ssa_form
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-outof-ssa.c:1065
0xe78937 rewrite_out_of_ssa(ssaexpand*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/tree-outof-ssa.c:1323
0x912f80 execute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200726/work/gcc-11-20200726/gcc/cfgexpand.c:6377

[Bug preprocessor/96323] [11 Regression] ICE in lex_raw_string, at libcpp/lex.c:1764

2020-07-26 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96323

--- Comment #1 from Arseny Solokha  ---
(In reply to Arseny Solokha from comment #0)
>   | ^% gcc-11.0.0 -c rozdnj5v.c -wrapper valgrind,-q
> rozdnj5v.c:1:24: error: invalid new-line in raw string delimiter

<…>

Oh, an excessive copy-paste.

[Bug preprocessor/96323] New: [11 Regression] ICE in lex_raw_string, at libcpp/lex.c:1764

2020-07-26 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96323

Bug ID: 96323
   Summary: [11 Regression] ICE in lex_raw_string, at
libcpp/lex.c:1764
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200719 snapshot (g:2e1b25350aa96b3f5678a056d0b55bb323c452d9)
ICEs when compiling the following testcase extracted from
gcc/testsuite/gcc.dg/c11-uni-string-1.c:

const char tu[] = R"a";
const char tua[] = "(R)a";

% gcc-11.0.0 -c rozdnj5v.c -wrapper valgrind,-q
rozdnj5v.c:1:24: error: invalid new-line in raw string delimiter
1 | const char tu[] = R"a";
  |   ^
==2536338== Conditional jump or move depends on uninitialised value(s)
==2536338==at 0x18ADA46: lex_raw_string (lex.c:1764)
==2536338==by 0x18ADA46: lex_string(cpp_reader*, cpp_token*, unsigned char
const*) (lex.c:2030)
==2536338==by 0x18AE7FE: _cpp_lex_direct (lex.c:2862)
==2536338==by 0x18AFD48: _cpp_lex_token (lex.c:2635)
==2536338==by 0x18B7297: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2810)
==2536338==by 0x882F90: c_lex_with_flags(tree_node**, unsigned int*,
unsigned char*, int) (c-lex.c:457)
==2536338==by 0x80156A: c_lex_one_token(c_parser*, c_token*, bool)
(c-parser.c:278)
==2536338==by 0x82B1B1: c_parser_peek_token (c-parser.c:482)
==2536338==by 0x82B1B1: c_parser_declaration_or_fndef(c_parser*, bool,
bool, bool, bool, bool, tree_node**, vec, bool,
tree_node*, oacc_routine_data*, bool*) (c-parser.c:2268)
==2536338==by 0x834683: c_parser_external_declaration(c_parser*)
(c-parser.c:1773)
==2536338==by 0x835199: c_parser_translation_unit (c-parser.c:1646)
==2536338==by 0x835199: c_parse_file() (c-parser.c:21822)
==2536338==by 0x88EFBD: c_common_parse_file() (c-opts.c:1188)
==2536338==by 0xDC48A2: compile_file() (toplev.c:458)
==2536338==by 0x7A79F4: do_compile (toplev.c:2307)
==2536338==by 0x7A79F4: toplev::main(int, char**) (toplev.c:2446)
==2536338==
rozdnj5v.c:1:1: internal compiler error: in lex_raw_string, at
libcpp/lex.c:1764
1 | const char tu[] = R"a";
  | ^% gcc-11.0.0 -c rozdnj5v.c -wrapper valgrind,-q
rozdnj5v.c:1:24: error: invalid new-line in raw string delimiter
1 | const char tu[] = R"a";
  |   ^
==2536338== Conditional jump or move depends on uninitialised value(s)
==2536338==at 0x18ADA46: lex_raw_string (lex.c:1764)
==2536338==by 0x18ADA46: lex_string(cpp_reader*, cpp_token*, unsigned char
const*) (lex.c:2030)
==2536338==by 0x18AE7FE: _cpp_lex_direct (lex.c:2862)
==2536338==by 0x18AFD48: _cpp_lex_token (lex.c:2635)
==2536338==by 0x18B7297: cpp_get_token_1(cpp_reader*, unsigned int*)
(macro.c:2810)
==2536338==by 0x882F90: c_lex_with_flags(tree_node**, unsigned int*,
unsigned char*, int) (c-lex.c:457)
==2536338==by 0x80156A: c_lex_one_token(c_parser*, c_token*, bool)
(c-parser.c:278)
==2536338==by 0x82B1B1: c_parser_peek_token (c-parser.c:482)
==2536338==by 0x82B1B1: c_parser_declaration_or_fndef(c_parser*, bool,
bool, bool, bool, bool, tree_node**, vec, bool,
tree_node*, oacc_routine_data*, bool*) (c-parser.c:2268)
==2536338==by 0x834683: c_parser_external_declaration(c_parser*)
(c-parser.c:1773)
==2536338==by 0x835199: c_parser_translation_unit (c-parser.c:1646)
==2536338==by 0x835199: c_parse_file() (c-parser.c:21822)
==2536338==by 0x88EFBD: c_common_parse_file() (c-opts.c:1188)
==2536338==by 0xDC48A2: compile_file() (toplev.c:458)
==2536338==by 0x7A79F4: do_compile (toplev.c:2307)
==2536338==by 0x7A79F4: toplev::main(int, char**) (toplev.c:2446)
==2536338==
rozdnj5v.c:1:1: internal compiler error: in lex_raw_string, at
libcpp/lex.c:1764
1 | const char tu[] = R"a";
  | ^

In my setup the ICE only shows up when initializing memory allocations w/
arbitrary values using glibc's MALLOC_PERTURB_/MALLOC_CHECK_ or running the
compiler under valgrind.

[Bug c++/96258] New: [11 Regression] ICE: Segmentation fault (in cp_parser_declaration)

2020-07-20 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96258

Bug ID: 96258
   Summary: [11 Regression] ICE: Segmentation fault (in
cp_parser_declaration)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code, openmp
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.0-alpha20200719 snapshot (g:2e1b25350aa96b3f5678a056d0b55bb323c452d9)
ICEs when compiling a file containing

#pragma omp declare simd

or

#pragma omp declare variant

w/ -fopenmp:

% g++-11.0.0 -fopenmp -c dpdbmn6d.cpp
dpdbmn6d.cpp:1:25: internal compiler error: Segmentation fault
1 | #pragma omp declare simd
  | ^
0x10233ef crash_signal
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/toplev.c:328
0x9dbbec cp_parser_declaration
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:13459
0x9dceef cp_parser_omp_declare_simd
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:41506
0x9abd2d cp_parser_omp_declare
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:42648
0x9abd2d cp_parser_pragma
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:43797
0x9dc3c0 cp_parser_translation_unit
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:4780
0x9dc3c0 c_parse_file()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:44062
0xaf9efd c_common_parse_file()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/c-family/c-opts.c:1188

[Bug c++/96257] New: [11 Regression] ICE in cp_parser_skip_to_pragma_eol, at cp/parser.c:3948

2020-07-20 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96257

Bug ID: 96257
   Summary: [11 Regression] ICE in cp_parser_skip_to_pragma_eol,
at cp/parser.c:3948
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code, openmp
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.0-alpha20200719 snapshot (g:2e1b25350aa96b3f5678a056d0b55bb323c452d9)
ICEs when compiling gcc/testsuite/gcc.dg/gomp/pr89796.c w/ -fopenmp:

% g++-11.0.0 -fopenmp -c gcc/testsuite/gcc.dg/gomp/pr89796.c
gcc/testsuite/gcc.dg/gomp/pr89796.c: In function 'int f2(int*)':
gcc/testsuite/gcc.dg/gomp/pr89796.c:23:1: internal compiler error: in
cp_parser_skip_to_pragma_eol, at cp/parser.c:3948
   23 | }
  | ^
0x646461 cp_parser_skip_to_pragma_eol
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:3948
0x646461 cp_parser_skip_to_pragma_eol
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:3936
0x995f97 cp_parser_skip_to_closing_parenthesis_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:3694
0x996181 cp_parser_skip_to_closing_parenthesis
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:3718
0x996181 cp_parser_compound_literal_p
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:6871
0x9c1821 cp_parser_postfix_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:7257
0x9a2929 cp_parser_binary_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:9628
0x9a45ae cp_parser_assignment_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:9933
0x9a32bd cp_parser_constant_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:10227
0x9a3a51 cp_parser_initializer_clause
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:23299
0x9a801f cp_parser_initializer
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:23237
0x9d0e43 cp_parser_init_declarator
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:20930
0x9b0e55 cp_parser_simple_declaration
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:13798
0x9b2bec cp_parser_declaration_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:13236
0x9b384f cp_parser_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:11542
0x9b47a8 cp_parser_statement_seq_opt
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:11908
0x9b4888 cp_parser_compound_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:11858
0x9ccd65 cp_parser_function_body
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:23143
0x9ccd65 cp_parser_ctor_initializer_opt_and_function_body
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:23194
0x9d0226 cp_parser_function_definition_after_declarator
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200719/work/gcc-11-20200719/gcc/cp/parser.c:29090

[Bug target/96178] New: ICE in emit_move_multi_word, at expr.c:3721

2020-07-12 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96178

Bug ID: 96178
   Summary: ICE in emit_move_multi_word, at expr.c:3721
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200712 snapshot (g:267891bd3c7ce3e16662eb2be7273f0bc8be9e7e)
ICEs when compiling the following testcase, reduced from
gcc/testsuite/gcc.target/powerpc/mma-builtin-2.c, w/ -mvsx:

void
foo2 (void)
{
  __vector_quad acc;
  __vector_pair vecp0;
  __attribute__ ((__vector_size__ (16))) unsigned char vec1;

  __builtin_mma_pmxvf64ger (, vecp0, vec1, 5, 3);
}

% powerpc-e300c3-linux-gnu-gcc-11.0.0 -mvsx -c vtmf2pkq.c
vtmf2pkq.c: In function 'foo2':
vtmf2pkq.c:8:3: error: '__builtin_mma_pmxvf64ger' requires the '-mmma' option
8 |   __builtin_mma_pmxvf64ger (, vecp0, vec1, 5, 3);
  |   ^~
during RTL pass: expand
vtmf2pkq.c:8:3: internal compiler error: in emit_move_multi_word, at
expr.c:3721
0x60261b emit_move_multi_word
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/expr.c:3721
0xabfc4e emit_move_insn(rtx_def*, rtx_def*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/expr.c:3929
0x983de9 load_register_parameters
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/calls.c:3084
0x983de9 expand_call(tree_node*, rtx_def*, int)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/calls.c:4530
0x129306f rs6000_expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode,
int)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/config/rs6000/rs6000-call.c:12276
0x971094 expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/builtins.c:7894
0xabce4e expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/expr.c:11232
0x999b98 expand_expr
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/expr.h:282
0x999b98 expand_call_stmt
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/cfgexpand.c:2703
0x999b98 expand_gimple_stmt_1
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/cfgexpand.c:3682
0x999b98 expand_gimple_stmt
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/cfgexpand.c:3847
0x99f614 expand_gimple_basic_block
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/cfgexpand.c:5888
0x9a1387 execute
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200712/work/gcc-11-20200712/gcc/cfgexpand.c:6572

[Bug target/96177] New: ICE: in extract_insn, at recog.c:2294 (error: unrecognizable insn)

2020-07-12 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96177

Bug ID: 96177
   Summary: ICE: in extract_insn, at recog.c:2294 (error:
unrecognizable insn)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: powerpc-*-linux-gnu

gcc-11.0.0-alpha20200705 snapshot (g:cc9a9229285a26ac12bc8de53237ce9c4d42f867)
ICEs when compiling the following testcase, extracted from
gcc/testsuite/gcc.target/powerpc/xxgenpc-runnable.c, w/ -mcpu=power10:

__attribute__ ((altivec (vector__))) char
ew (__attribute__ ((altivec (vector__))) char uk)
{
  return __builtin_vec_xxgenpcvm (uk, 1);
}

% powerpc-e300c3-linux-gnu-gcc-11.0.0 -mcpu=power10 -c rwmfukd0.c
rwmfukd0.c: In function 'ew':
rwmfukd0.c:5:1: error: unrecognizable insn:
5 | }
  | ^
(insn 7 6 10 2 (set (reg:V16QI 117 [ _2 ])
(unspec:V16QI [
(reg:V16QI 119)
(const_int 1 [0x1])
] UNSPEC_XXGENPCV)) "rwmfukd0.c":4:10 -1
 (nil))
during RTL pass: vregs
rwmfukd0.c:5:1: internal compiler error: in extract_insn, at recog.c:2294
0x696456 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/rtl-error.c:108
0x696476 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/rtl-error.c:116
0x694697 extract_insn(rtx_insn*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/recog.c:2294
0xb23a93 instantiate_virtual_regs_in_insn
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:1607
0xb23a93 instantiate_virtual_regs
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:1977
0xb23a93 execute
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:2026

[Bug target/96072] New: ICE: Segmentation fault (in add_reg_note)

2020-07-05 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96072

Bug ID: 96072
   Summary: ICE: Segmentation fault (in add_reg_note)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: powerpc-*-linux-gnu

gcc-11.0.0 snapshot (g:cc9a9229285a26ac12bc8de53237ce9c4d42f867) ICEs when
compiling gcc/testsuite/gcc.target/pru/clobber-sp.c w/ -O1:

% powerpc-e300c3-linux-gnu-gcc-11.0.0 -O1 -w -c
gcc/testsuite/gcc.target/pru/clobber-sp.c
during RTL pass: pro_and_epilogue
gcc/testsuite/gcc.target/pru/clobber-sp.c: In function 'test1':
gcc/testsuite/gcc.target/pru/clobber-sp.c:24:1: internal compiler error:
Segmentation fault
   24 | }
  | ^
0xe74ba6 crash_signal
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/toplev.c:328
0xe09f99 add_reg_note(rtx_def*, reg_note, rtx_def*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/rtlanal.c:2404
0x1271d6a rs6000_emit_epilogue(epilogue_type)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/config/rs6000/rs6000-logue.c:4884
0x15803ce gen_epilogue()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/config/rs6000/rs6000.md:13210
0x11f5bf8 target_gen_epilogue
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/config/rs6000/rs6000.md:10475
0xb2d46f make_epilogue_seq
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:5822
0xb2d55f thread_prologue_and_epilogue_insns()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:5904
0xb2dc86 rest_of_handle_thread_prologue_and_epilogue
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:6394
0xb2dc86 execute
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/function.c:6470

[Bug fortran/96071] New: ICE in matching_typebound_op, at fortran/interface.c:4233

2020-07-05 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96071

Bug ID: 96071
   Summary: ICE in matching_typebound_op, at
fortran/interface.c:4233
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gfortran-11.0.0 snapshot (g:cc9a9229285a26ac12bc8de53237ce9c4d42f867) ICEs when
compiling the following testcase:

module z5
  type :: iu
   contains
 generic :: operator (+) => n1
  end type iu
contains
  subroutine p3 (hl, mp, id)
class(iu) :: hl
integer :: mp
real :: id (hl + mp)
  end subroutine p3
end module z5

% powerpc-e300c3-linux-gnu-gfortran-11.0.0 -c rwmfukd0.f90
f951: internal compiler error: in matching_typebound_op, at
fortran/interface.c:4233
0x599046 matching_typebound_op
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/interface.c:4233
0x87e754 gfc_extend_expr(gfc_expr*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/interface.c:4349
0x8e563b resolve_operator
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:4417
0x8e1f57 gfc_resolve_expr(gfc_expr*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:7047
0x8e1f57 gfc_resolve_expr(gfc_expr*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:7016
0x835bb2 resolve_array_bound
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/array.c:378
0x836950 gfc_resolve_array_spec(gfc_array_spec*, int)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/array.c:422
0x8e8307 gfc_resolve_formal_arglist(gfc_symbol*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:341
0x908182 do_traverse_symtree
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/symbol.c:4170
0x8e8b34 resolve_formal_arglists
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:563
0x8e8b34 resolve_contained_functions
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:1129
0x8e8b34 resolve_types
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:17180
0x8dc6fe gfc_resolve(gfc_namespace*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:17306
0x8dc6fe gfc_resolve(gfc_namespace*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/resolve.c:17287
0x8cdceb gfc_parse_file()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/parse.c:6448
0x91df6e gfc_be_parse_file
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/fortran/f95-lang.c:212

(while my target here is powerpc, the ICE is not target-specific)

[Bug tree-optimization/92860] [8/9/10/11 regression] Global flags affected by -O settings are clobbered by optimize attribute

2020-07-05 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92860

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #38 from Arseny Solokha  ---
JFTR I can easily reproduce it e.g. in the following setup:

% powerpc-e300c3-linux-gnu-gcc-11.0.0 -mcpu=power9 -c
gcc/testsuite/gcc.target/s390/target-attribute/tpragma-struct-vx-1.c
gcc/testsuite/gcc.target/s390/target-attribute/tpragma-struct-vx-1.c:10:9:
error: #pragma GCC target 'arch=z13' is invalid
   10 | #pragma GCC target ("arch=z13,vx")
  | ^~~
gcc/testsuite/gcc.target/s390/target-attribute/tpragma-struct-vx-1.c:10:9:
error: #pragma GCC target 'vx' is invalid
gcc/testsuite/gcc.target/s390/target-attribute/tpragma-struct-vx-1.c:23:9:
internal compiler error: 'global_options' are modified in local context
   23 | #pragma GCC pop_options
  | ^~~
0xd89fc5 cl_optimization_compare(gcc_options*, gcc_options*)
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/build/gcc/options-save.c:10459
0x9196b6 handle_pragma_pop_options
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/c-family/c-pragma.c:1090
0x895510 c_parser_pragma
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/c/c-parser.c:12544
0x8b7c75 c_parser_external_declaration
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/c/c-parser.c:1754
0x8b82b1 c_parser_translation_unit
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/c/c-parser.c:1646
0x8b82b1 c_parse_file()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/c/c-parser.c:21822
0x916cb7 c_common_parse_file()
   
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20200705/work/gcc-11-20200705/gcc/c-family/c-opts.c:1190

[Bug c++/95985] New: [11 Regression] ICE: tree check: expected tree_list, have error_mark in common_handle_aligned_attribute, at c-family/c-attribs.c:1980

2020-06-29 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95985

Bug ID: 95985
   Summary: [11 Regression] ICE: tree check: expected tree_list,
have error_mark in common_handle_aligned_attribute, at
c-family/c-attribs.c:1980
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.0-alpha20200628 snapshot (g:b26fd416fb0a734d3f3e56629b6dff2e3c25dd40)
ICEs when compiling the following testcase, extracted from
test/std/utilities/variant/variant.variant/variant_void.fail.cpp from the
libcxx 10.0.0 test suite:

template 
struct pf {
  struct sr;
  alignas (sr) int ci;
};

pf ci;

% g++-11.0.0 -c hdbdodhk.cpp
hdbdodhk.cpp: In instantiation of 'struct pf':
hdbdodhk.cpp:7:9:   required from here
hdbdodhk.cpp:4:12: error: invalid application of '__alignof__' to incomplete
type 'pf::sr'
4 |   alignas (sr) int ci;
  |^~
hdbdodhk.cpp:4:20: internal compiler error: tree check: expected tree_list,
have error_mark in common_handle_aligned_attribute, at
c-family/c-attribs.c:1980
4 |   alignas (sr) int ci;
  |^~
0x7c7f86 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/tree.c:9685
0x6b475b tree_check(tree_node*, char const*, int, char const*, tree_code)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/tree.h:3301
0x6b475b common_handle_aligned_attribute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/c-family/c-attribs.c:1980
0xaa3247 decl_attributes(tree_node**, tree_node*, int, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/attribs.c:714
0x92e187 cplus_decl_attributes(tree_node**, tree_node*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/decl2.c:1601
0xa0cb99 tsubst_decl
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/pt.c:14379
0xa303cd instantiate_class_template_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/pt.c:11843
0xa317f2 instantiate_class_template(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/pt.c:12098
0xa7a109 complete_type(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/typeck.c:137
0x8fc4a3 start_decl_1(tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/decl.c:5490
0x91e888 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/decl.c:5453
0x9ce4b1 cp_parser_init_declarator
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:20818
0x9aeb76 cp_parser_simple_declaration
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:13785
0x9d92f6 cp_parser_declaration
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:13484
0x9d9a4f cp_parser_translation_unit
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:4761
0x9d9a4f c_parse_file()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:44043
0xaf677b c_common_parse_file()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/c-family/c-opts.c:1190

[Bug c++/95963] New: [11 Regression] ICE: Segmentation fault (in contains_struct_check)

2020-06-29 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95963

Bug ID: 95963
   Summary: [11 Regression] ICE: Segmentation fault (in
contains_struct_check)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.0-alpha20200628 snapshot (g:b26fd416fb0a734d3f3e56629b6dff2e3c25dd40)
ICEs when compiling gcc/testsuite/g++.dg/cpp1z/launder7.C or launder2.C w/
-Wnonnull:

% g++-11.0.0 -Wnonnull -c gcc/testsuite/g++.dg/cpp1z/launder7.C
gcc/testsuite/g++.dg/cpp1z/launder7.C: In function 'void bar(A*)':
gcc/testsuite/g++.dg/cpp1z/launder7.C:9:31: internal compiler error:
Segmentation fault
9 |   __builtin_launder (p)->foo ();
  |   ^
0x1011d1f crash_signal
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/toplev.c:328
0xad07cf contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/tree.h:3414
0xad07cf check_function_arguments_recurse(void (*)(void*, tree_node*, unsigned
long), void*, tree_node*, unsigned long)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/c-family/c-common.c:5820
0xad1162 check_function_nonnull
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/c-family/c-common.c:5315
0xad1162 check_function_arguments(unsigned int, tree_node const*, tree_node
const*, int, tree_node**, vec*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/c-family/c-common.c:5764
0x884456 build_over_call
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/call.c:8868
0x88692c build_new_method_call_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/call.c:10348
0x88784f build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/call.c:10423
0x9bf26a cp_parser_postfix_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:7481
0x9a05a9 cp_parser_binary_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:9609
0x9a224e cp_parser_assignment_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:9914
0x9a2613 cp_parser_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:10082
0x9a55d8 cp_parser_expression_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:11742
0x9b0c33 cp_parser_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:11538
0x9b24e8 cp_parser_statement_seq_opt
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:11889
0x9b25c8 cp_parser_compound_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:11839
0x9caab5 cp_parser_function_body
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:23116
0x9caab5 cp_parser_ctor_initializer_opt_and_function_body
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:23167
0x9cdf96 cp_parser_function_definition_after_declarator
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:29063
0x9cefa9 cp_parser_function_definition_from_specifiers_and_declarator
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200628/work/gcc-11-20200628/gcc/cp/parser.c:28979

[Bug c++/95844] New: [11 Regression] ICE: Segmentation fault (in cp_warn_deprecated_use)

2020-06-23 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95844

Bug ID: 95844
   Summary: [11 Regression] ICE: Segmentation fault (in
cp_warn_deprecated_use)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200621 snapshot (g:47ddb895df311e546a6f54345e18b8749ac50324)
ICEs when compiling the following testcase, extracted from
test/CXX/class/class.compare/class.compare.default/p4.cpp from the clang 10.0.0
test suite, w/ -std=c++20 -Wdeprecated-copy:

namespace std {
  struct strong_ordering {
  };
}

struct F {
  [[deprecated("oh no")]] std::strong_ordering operator<=>(const F&) const =
default;
};
void use_f(F f) {
  void(f == f);
}

% g++-11.0.0 -std=c++20 -Wdeprecated-copy -c uwfljn63.cpp
uwfljn63.cpp: In function 'void use_f(F)':
uwfljn63.cpp:10:13: internal compiler error: Segmentation fault
   10 |   void(f == f);
  | ^
0x100872f crash_signal
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/toplev.c:328
0x9277f3 cp_warn_deprecated_use(tree_node*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/decl2.c:5426
0x92fb8e cp_warn_deprecated_use(tree_node*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/decl2.c:5393
0x92fb8e mark_used(tree_node*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/decl2.c:5547
0x880abb build_over_call
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/call.c:9064
0x888553 build_new_op_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/call.c:6341
0x888d6d build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node**, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/call.c:6605
0xa75a0d build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node**, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/typeck.c:4280
0x99bf34 cp_parser_binary_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:9777
0x99da2e cp_parser_assignment_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:9914
0x9a09a0 cp_parser_parenthesized_expression_list
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:8031
0x9a11f0 cp_parser_functional_cast
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:29643
0x9b9d44 cp_parser_postfix_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:7219
0x99bd79 cp_parser_binary_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:9609
0x99da2e cp_parser_assignment_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:9914
0x99ddf3 cp_parser_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:10082
0x9a0da8 cp_parser_expression_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:11742
0x9ac443 cp_parser_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:11538
0x9adcf8 cp_parser_statement_seq_opt
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:11889
0x9addd8 cp_parser_compound_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200621/work/gcc-11-20200621/gcc/cp/parser.c:11839

[Bug middle-end/94895] ICE in expand_block_tm, at trans-mem.c:2643

2020-06-17 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94895

--- Comment #2 from Arseny Solokha  ---
(In reply to Nicholas Krause from comment #1)
> Confirmed however seems to be latent as it seems to be hitting:
> case GIMPLE_ASM:
>   gcc_unreachable ();

No, it's not latent. The code you quoted is exactly the immediate cause of this
ICE. There's an explicitly asserted assumption in rarely used, virtually
unmaintained, nine years old TM code that fails under some exotic artificial
circumstances no one cares about. Also, to reason about whether the issue was
latent or not you really had to bisect it, though this case is trivial and
doesn't even need bisection as the issue was in the file from its inception.

There's little value in simply pointing out that gcc_unreachable () w/o
understanding what exactly went wrong there. Anyone can do that. And anyone can
also run git blame on the file in question or click 'blame' in gitweb. If you
really want to help out, please come up w/ correct analysis which would result
in a good patch fixing the issue. Thanks.


> in expand_block_tm and the commit mentioned is touching coroutines.

How does the mentioned commit have to do w/ the issue?!

[Bug tree-optimization/95679] New: [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in type_has_mode_precision_p, at tree.h:6231

2020-06-15 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95679

Bug ID: 95679
   Summary: [11 Regression] ICE: tree check: expected class
'type', have 'exceptional' (error_mark) in
type_has_mode_precision_p, at tree.h:6231
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200614 snapshot (g:3de12cc548c7a37bb68ea10937709dc6385a3b2b)
ICEs when compiling the following testcase w/ -Os --param
scev-max-expr-size=15:

int ex;

void
u1 (int hu, int nd)
{
  while (hu != 0)
if (nd == hu || nd == ex)
  while (hu < u1)
++hu;
}

% gcc-11.0.0 -Os --param scev-max-expr-size=15 -w -c nnbsry0z.c
during GIMPLE pass: cunroll
nnbsry0z.c: In function 'u1':
nnbsry0z.c:4:1: internal compiler error: tree check: expected class 'type',
have 'exceptional' (error_mark) in type_has_mode_precision_p, at tree.h:6231
4 | u1 (int hu, int nd)
  | ^~
0x70460e tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree.c:9735
0x754802 tree_class_check(tree_node const*, tree_code_class, char const*, int,
char const*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree.h:3675
0x754802 type_has_mode_precision_p(tree_node const*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree.h:6231
0x754802 generic_simplify_218
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/build/gcc/generic-match.c:10515
0x134447e generic_simplify_CONVERT_EXPR
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/build/gcc/generic-match.c:19701
0xa65d30 fold_unary_loc(unsigned int, tree_code, tree_node*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/fold-const.c:8612
0xa67418 fold_build1_loc(unsigned int, tree_code, tree_node*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/fold-const.c:13067
0xa65ecb fold_unary_loc(unsigned int, tree_code, tree_node*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/fold-const.c:8628
0xa67418 fold_build1_loc(unsigned int, tree_code, tree_node*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/fold-const.c:13067
0x17bc40d chrec_convert_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-chrec.c:1482
0x17bf9e1 chrec_convert(tree_node*, tree_node*, gimple*, bool, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-chrec.c:1536
0x17bf9e1 chrec_convert_rhs(tree_node*, tree_node*, gimple*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-chrec.c:1406
0x17bf9e1 chrec_apply(unsigned int, tree_node*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-chrec.c:622
0xe8552a compute_overall_effect_of_inner_loop(loop*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-scalar-evolution.c:471
0xe8552a compute_overall_effect_of_inner_loop(loop*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-scalar-evolution.c:447
0xe85b16 follow_ssa_edge_inner_loop_phi
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-scalar-evolution.c:1114
0xe85b16 follow_ssa_edge_expr
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-scalar-evolution.c:1183
0xe85c2e follow_ssa_edge_in_condition_phi_branch
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-scalar-evolution.c:1011
0xe85c2e follow_ssa_edge_in_condition_phi
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-scalar-evolution.c:1037
0xe85c2e follow_ssa_edge_expr
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200614/work/gcc-11-20200614/gcc/tree-scalar-evolution.c:1165

[Bug c++/95618] New: [11 Regression] ICE in remap_type_1, at tree-inline.c:607

2020-06-09 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95618

Bug ID: 95618
   Summary: [11 Regression] ICE in remap_type_1, at
tree-inline.c:607
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.0-alpha20200607 snapshot (g:f08995eefbf579acfe40f0204727d5ce388e3d0a)
ICEs when compiling the following testcase reduced from
test/SemaTemplate/instantiate-self.cpp from the clang 10.0.0 test suite:

namespace test6 {
  template constexpr T f(T);
  template constexpr T g(T t) {
typedef int arr[f(T())];
return t;
  }
  template constexpr T f(T t) {
typedef int arr[g(T())];
return t;
  }
  int n = f(0);
}

% g++-11.0.0 -c novdqht4.cpp
novdqht4.cpp: In function 'constexpr T test6::f(T) [with T = int]':
novdqht4.cpp:11:12:   in 'constexpr' expansion of 'test6::f(0)'
novdqht4.cpp:8:22:   in 'constexpr' expansion of 'test6::g(0)'
novdqht4.cpp:4:22:   in 'constexpr' expansion of 'test6::f(0)'
novdqht4.cpp:11:14: internal compiler error: in remap_type_1, at
tree-inline.c:607
   11 |   int n = f(0);
  |  ^
0x76f65b remap_type_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/tree-inline.c:607
0x107c420 remap_type(tree_node*, copy_body_data*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/tree-inline.c:736
0x107c65d remap_decl(tree_node*, copy_body_data*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/tree-inline.c:400
0x107f754 remap_decls
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/tree-inline.c:785
0x107fae9 remap_block
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/tree-inline.c:843
0x1082889 copy_bind_expr
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/tree-inline.c:939
0x1082889 copy_tree_body_r(tree_node**, int*, void*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/tree-inline.c:1284
0x12cc28a walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set >*))
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/tree.c:11957
0x1077830 copy_tree_body
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/tree-inline.c:3272
0x107d245 copy_fn(tree_node*, tree_node*&, tree_node*&)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/tree-inline.c:6625
0x8ac08b get_fundef_copy
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/cp/constexpr.c:1243
0x8acc08 cxx_eval_call_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/cp/constexpr.c:2511
0x8af6a8 cxx_eval_constant_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/cp/constexpr.c:5701
0x8b8b45 cxx_eval_store_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/cp/constexpr.c:4729
0x8af5ba cxx_eval_constant_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/cp/constexpr.c:5810
0x8af43f cxx_eval_constant_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/cp/constexpr.c:6203
0x8aeec0 cxx_eval_constant_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/cp/constexpr.c:6021
0x8b08f5 cxx_eval_constant_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/cp/constexpr.c:5879
0x8afcb4 cxx_eval_statement_list
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/cp/constexpr.c:5271
0x8afcb4 cxx_eval_constant_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200607/work/gcc-11-20200607/gcc/cp/constexpr.c:6342

[Bug target/95602] New: [10/11 Regression] Wrong code w/ -O0

2020-06-09 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95602

Bug ID: 95602
   Summary: [10/11 Regression] Wrong code w/ -O0
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: x86_64-unknown-linux-gnu

Created attachment 48712
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48712=edit
Testcase

The attached (probably invalid) program segfaults if compiled w/
gcc-11.0.0-alpha20200607 snapshot (g:f08995eefbf579acfe40f0204727d5ce388e3d0a)
or gcc 10.1 w/ -O0. The segfault goes away if compiled w/ higher optimization
levels or setting alignment of |struct dy::oj| greater than 8.

% x86_64-unknown-linux-gnu-gcc-11.0.0 -O0 -w -o bad n1rnbqt6.c
% ./bad
zsh: segmentation fault (core dumped)  ./bad

(gdb) disassemble
<…>
   0x4780 <+253>:   test   %rax,%rax
   0x4783 <+256>:   sete   %al
   0x4786 <+259>:   movzbl %al,%eax
   0x4789 <+262>:   mov%eax,-0x10c(%rbp)
   0x478f <+268>:   mov-0x110(%rbp),%eax
   0x4795 <+274>:   cmp-0x10c(%rbp),%eax
   0x479b <+280>:   jne0x4856 
   0x47a1 <+286>:   mov0x1888(%rip),%rax#
0x6030 
=> 0x47a8 <+293>:   movdqa (%rax),%xmm1
   0x47ac <+297>:   movaps %xmm1,-0x120(%rbp)
<…>
(gdb) info registers rax
rax0x6044  93824992239684

gcc 9.3 generates the following code instead:

<…>
 779:   48 85 c0test   %rax,%rax
 77c:   0f 94 c0sete   %al
 77f:   0f b6 c0movzbl %al,%eax
 782:   89 85 f4 fe ff ff   mov%eax,-0x10c(%rbp)
 788:   8b 85 f0 fe ff ff   mov-0x110(%rbp),%eax
 78e:   3b 85 f4 fe ff ff   cmp-0x10c(%rbp),%eax
 794:   0f 85 b3 00 00 00   jne84d 
 79a:   48 8b 05 7f 18 00 00mov0x187f(%rip),%rax# 2020 
 7a1:   4c 8b 30mov(%rax),%r14
 7a4:   4c 8b 78 08 mov0x8(%rax),%r15
<…>

[Bug target/79451] [8/9/10/11 Regression] ICE in expand_expr_real_2, at expr.c:9021 w/ -O3 -floop-nest-optimize

2020-06-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79451

Arseny Solokha  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Arseny Solokha  ---
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9
development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html

[Bug target/85121] Assembler messages: Error: operand out of range (264 is not between 0 and 248)

2020-06-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85121

Arseny Solokha  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Arseny Solokha  ---
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9
development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html

[Bug target/80700] [8 Regression] ICE: Bus error (on SPE target)

2020-06-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80700

Arseny Solokha  changed:

   What|Removed |Added

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

--- Comment #12 from Arseny Solokha  ---
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9
development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html

[Bug target/84302] ICE: Segmentation fault (in extract_insn) on SPE target

2020-06-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84302

Arseny Solokha  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Arseny Solokha  ---
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9
development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html

[Bug target/82138] [8/9/10/11 Regression] Assembler messages: Error: can't resolve `.got2' {.got2 section} - `.LCF0' {.text.unlikely section}

2020-06-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82138

Arseny Solokha  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Arseny Solokha  ---
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9
development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html

[Bug target/87083] ICE in extract_insn, at recog.c:2305 (error: unrecognizable insn)

2020-06-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87083

Arseny Solokha  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Arseny Solokha  ---
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9
development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html

[Bug target/81288] [8 Regression] ICE on 32-bit BE powerpcspe w/ -misel -O2 (-O3, -Ofast, -Os)

2020-06-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81288

Arseny Solokha  changed:

   What|Removed |Added

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

--- Comment #11 from Arseny Solokha  ---
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9
development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html

[Bug rtl-optimization/79438] [8/9/10/11 Regression] ICE during RA w/ -O3 (or -Ofast) -funroll-loops for 32-bit BE SPE target

2020-06-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79438

Arseny Solokha  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #7 from Arseny Solokha  ---
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9
development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html

[Bug target/85170] ICE: in final_scan_insn_1, at final.c:3139 (error: could not split insn)

2020-06-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85170

Arseny Solokha  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Arseny Solokha  ---
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9
development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html

[Bug target/81628] Backport r250637 and r250638 to the powerpcspe* target

2020-06-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81628

Arseny Solokha  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #1 from Arseny Solokha  ---
The powerpcspe backend has been deprecated in GCC 8 and removed during GCC 9
development. See corresponding mailing list threads[1,2,3] for details.

[1] https://gcc.gnu.org/legacy-ml/gcc/2018-04/msg00102.html
[2] https://gcc.gnu.org/legacy-ml/gcc-patches/2018-12/msg00123.html
[3] https://gcc.gnu.org/pipermail/gcc/2020-May/232342.html

[Bug target/95256] [11 Regression] ICE in convert_move, at expr.c:278 since r11-263-g7c355156aa20eaec

2020-05-29 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95256

Arseny Solokha  changed:

   What|Removed |Added

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

--- Comment #7 from Arseny Solokha  ---
.

[Bug target/95211] [11 Regression] ICE in emit_unop_insn, at optabs.c:3622

2020-05-29 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95211

Arseny Solokha  changed:

   What|Removed |Added

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

--- Comment #10 from Arseny Solokha  ---
.

[Bug target/95256] [11 Regression] ICE in convert_move, at expr.c:278 since r11-263-g7c355156aa20eaec

2020-05-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95256

--- Comment #5 from Arseny Solokha  ---
Is there some further work pending, or should this PR be closed now?

[Bug target/95211] [11 Regression] ICE in emit_unop_insn, at optabs.c:3622

2020-05-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95211

--- Comment #8 from Arseny Solokha  ---
Is there some further work pending, or should this PR be closed now?

[Bug rtl-optimization/95394] New: [11 Regression] ICE in emit_move_insn, at expr.c:3814

2020-05-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95394

Bug ID: 95394
   Summary: [11 Regression] ICE in emit_move_insn, at expr.c:3814
   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: asolokha at gmx dot com
  Target Milestone: ---
Target: x86_64-unknown-linux-gnu-gcc

gcc-11.0.0-alpha20200524 snapshot (g:d176184d98a00ab379ae5959aed1908a79995e6b)
ICEs when compiling the following testcase w/ -O1:

void
ri (__int128 *z8, int x8)
{
  int es;
  int *kx = 

  while (x8 != 1)
while (kx < (int *) 2)
  {
z8 = (__int128 *) 
*z8 /= 3;
  }
}

% x86_64-unknown-linux-gnu-gcc-11.0.0 -O1 -c h9pqh5we.c
during RTL pass: subreg3
h9pqh5we.c: In function 'ri':
h9pqh5we.c:13:1: internal compiler error: in emit_move_insn, at expr.c:3814
   13 | }
  | ^
0x622b77 emit_move_insn(rtx_def*, rtx_def*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/expr.c:3814
0x17647f4 resolve_simple_move
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/lower-subreg.c:1090
0x1765919 decompose_multiword_subregs
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/lower-subreg.c:1648
0x17662ad execute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/lower-subreg.c:1812

[Bug middle-end/95315] [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry) since r11-382-g7a50e7087567cffb

2020-05-27 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95315

--- Comment #4 from Arseny Solokha  ---
(In reply to Jakub Jelinek from comment #2)
> Created attachment 48603 [details]
> gcc11-pr95315.patch
> 
> Untested fix.

@@ -1823,6 +1850,12 @@ omp_resolve_declare_variant (tree base)
}
}

+  static struct cgraph_node_hook_list *node_removal_hook_holder;
+  if (node_removal_hook_holder)
+   node_removal_hook_holder
+ = symtab->add_cgraph_removal_hook (omp_declare_variant_remove_hook,
+NULL);
+
   if (omp_declare_variants == NULL)
omp_declare_variants
  = hash_table::create_ggc (64);

Shouldn't there be

  if (!node_removal_hook_holder)
node_removal_hook_holder
  = symtab->add_cgraph_removal_hook (…

instead?

[Bug middle-end/92815] [8/9/10 Regression] spurious -Wstringop-overflow writing into a flexible array of an extern struct

2020-05-25 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92815

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #9 from Arseny Solokha  ---
Created attachment 48593
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48593=edit
Diff between assembler output produced by gcc and g++ 11

Though there are no flexible array members in C++, is it expected for g++ to
behave differently w/ this testcase?

While compiling it w/ gcc yeilds the following, which is expected:

% gcc-11.0.0 -c gcc/testsuite/gcc.dg/builtin-object-size-21.c
gcc/testsuite/gcc.dg/builtin-object-size-21.c:29:14: error: size of variable
'xm3_4' is too large
   29 | struct Ax_m3 xm3_4 = { { 0 }, { 1, 2, 3, 3 } };   // { dg-error "too
large" }
  |  ^
gcc/testsuite/gcc.dg/builtin-object-size-21.c:43:14: error: size of variable
'xmx_1' is too large
   43 | struct Ax_mx xmx_1 = { { 0 }, { 1 } };// { dg-error "too
large" }
  |

W/ g++ I have

% g++-11.0.0 -c gcc/testsuite/gcc.dg/builtin-object-size-21.c
/tmp/ccPBumhF.s: Assembler messages:
/tmp/ccPBumhF.s: Fatal error: can't write 14 bytes to section .text of
/tmp/ccj6lymE.o: 'file truncated'
/usr/lib/gcc/x86_64-unknown-linux-gnu/11.0.0/../../../../x86_64-unknown-linux-gnu/bin/as:
BFD (Gentoo 2.34 p4) 2.34.0 assertion fail
/var/tmp/portage/sys-devel/binutils-2.34-r1/work/binutils-2.34/bfd/elf.c:3169
/tmp/ccPBumhF.s: Fatal error: can't close /tmp/ccj6lymE.o: file truncated

because of

[pid 1165642] openat(AT_FDCWD, "builtin-object-size-21.o",
O_RDWR|O_CREAT|O_TRUNC, 0666) = 3
<…>
[pid 1165642] fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
[pid 1165642] lseek(3, -9223372036854775808, SEEK_SET) = -1 EINVAL (Invalid
argument)

Or, when writing to an "endless" file w/ -o /dev/null:

[pid 1164514] lseek(3, -9223372036854775808, SEEK_SET) = 0
[pid 1164514] read(3, "", 640)  = 0
[pid 1164514] lseek(3, 640, SEEK_CUR)   = 0
[pid 1164514] write(3, "\0builtin-object-size-21.c\0xm3_0\0"..., 96) = 96
[pid 1164514] lseek(3, 0, SEEK_SET) = 0
[pid 1164514] read(3, "", 4096) = 0
[pid 1164514] lseek(3, 64, SEEK_CUR)= 0
[pid 1164514] write(3, "UH\211\345\220]\303UH\211\345\220]\303", 14) = 14
[pid 1164514] lseek(3, 0, SEEK_SET) = 0
[pid 1164514] read(3, "", 4096) = 0
[pid 1164514] lseek(3, 96, SEEK_CUR)= 0
[pid 1164514] write(3,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4096
[pid 1164514] write(3,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4096
[pid 1164514] write(3,
"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) =
4096

[Bug middle-end/95315] New: [11 Regression] ICE: Segmentation fault (in lookup_page_table_entry)

2020-05-25 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95315

Bug ID: 95315
   Summary: [11 Regression] ICE: Segmentation fault (in
lookup_page_table_entry)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code, openmp
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200524 snapshot (g:d176184d98a00ab379ae5959aed1908a79995e6b)
ICEs when compiling gcc/testsuite/c-c++-common/gomp/declare-variant-5.c w/ -O2
-fopenmp --param ggc-min-heapsize=0:

% gcc-11.0.0 -O2 -fopenmp --param ggc-min-heapsize=0 -c
gcc/testsuite/c-c++-common/gomp/declare-variant-5.c
gcc/testsuite/c-c++-common/gomp/declare-variant-5.c: In function 'test':
gcc/testsuite/c-c++-common/gomp/declare-variant-5.c:36:1: internal compiler
error: Segmentation fault
   36 | }
  | ^
0xd9fcff crash_signal
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/toplev.c:328
0x8af45b lookup_page_table_entry
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/ggc-page.c:630
0x8af45b ggc_set_mark(void const*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/ggc-page.c:1544
0xb0b331 gt_ggc_mx_symtab_node(void*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/build/gcc/gtype-desc.c:1300
0xc58316 gt_ggc_mx_omp_declare_variant_base_entry(void*)
./gt-omp-general.h:47
0xc58316 gt_ggc_mx_omp_declare_variant_base_entry(void*)
./gt-omp-general.h:41
0xc58316 gt_ggc_mx(omp_declare_variant_base_entry*&)
./gt-omp-general.h:65
0xc55121
ggc_remove::ggc_mx(omp_declare_variant_base_entry*&)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/hash-traits.h:237
0xc55121
ggc_remove::ggc_maybe_mx(omp_declare_variant_base_entry*&)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/hash-traits.h:244
0xc55121 gt_ggc_mx
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/hash-table.h:1163
0xc55121 gt_ggc_mx_hash_table_omp_declare_variant_alt_hasher_(void*)
./gt-omp-general.h:90
0xc55121 gt_ggc_mx_hash_table_omp_declare_variant_alt_hasher_(void*)
./gt-omp-general.h:85
0xa93055 ggc_mark_root_tab
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/ggc-common.c:78
0xa9336c ggc_mark_roots()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/ggc-common.c:95
0x8afdc8 ggc_collect()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200524/work/gcc-11-20200524/gcc/ggc-page.c:2220

[Bug c/95312] Missing quoting of format directives emitted by -Wformat

2020-05-25 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95312

--- Comment #1 from Arseny Solokha  ---
(In reply to Arseny Solokha from comment #0)
> All gcc since 4.6, where -Wformat was initially introduced

(Well, it of course was introduced much earlier, but since that release it
started emitting verbose diagnostics instead of "too few arguments for
format".)

[Bug c/95312] New: Missing quoting of format directives emitted by -Wformat

2020-05-25 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95312

Bug ID: 95312
   Summary: Missing quoting of format directives emitted by
-Wformat
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

All gcc since 4.6, where -Wformat was initially introduced, emit the following
when compiling snippets like that w/ -Wformat:

#include 

int
foo (FILE *f, char *s)
{
  return fscanf (f, "%c%[^\n\n]", s);
}

% gcc-11.0.0 -fsyntax-only -Wformat -c po6k6b4n.c
po6k6b4n.c: In function 'foo':
po6k6b4n.c:6:29: warning: format '%[^

   ' expects a matching 'char *' argument [-Wformat=]
6 |   return fscanf (f, "%c%[^\n\n]", s);
  |~^~
  | |
  | char *

It seems wrong to me that the format directive is not quoted in the warning
text.

[Bug target/95256] New: [11 Regression] ICE in convert_move, at expr.c:278

2020-05-21 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95256

Bug ID: 95256
   Summary: [11 Regression] ICE in convert_move, at expr.c:278
   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: x86_64-unknown-linux-gnu

gcc-11.0.0-alpha20200517 snapshot (g:2b9a271b2d0ba340234a138b7f8289bd7dca2fc5)
ICEs when compiling the following testcase w/ -march=skylake-avx512 -O1
-ftree-slp-vectorize:

struct cy {
  long int m5;
  long int i3;
};

void
ys (struct cy *jl, float u6)
{
  jl->m5 = u6;
  jl->i3 = u6;
}

 x86_64-unknown-linux-gnu-gcc-11.0.0 -march=skylake-avx512 -O1
-ftree-slp-vectorize -c mwwf4yc9.c
during RTL pass: expand
mwwf4yc9.c: In function 'ys':
mwwf4yc9.c:9:10: internal compiler error: in convert_move, at expr.c:278
9 |   jl->m5 = u6;
  |   ~~~^~~~
0x6212ce convert_move(rtx_def*, rtx_def*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:278
0xa27290 convert_modes(machine_mode, machine_mode, rtx_def*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:737
0xc94665 expand_fix(rtx_def*, rtx_def*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/optabs.c:4991
0xa1d1c5 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:9139
0xa2352a expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:10054
0xa3056a expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:8358
0xa3056a expand_expr
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.h:282
0xa3056a expand_assignment(tree_node*, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:5090
0x8fdf17 expand_gimple_stmt_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cfgexpand.c:3749
0x8fdf17 expand_gimple_stmt
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cfgexpand.c:3847
0x903b11 expand_gimple_basic_block
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cfgexpand.c:5887
0x9055f6 execute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cfgexpand.c:6571

[Bug target/95211] [11 Regression] ICE in emit_unop_insn, at optabs.c:3622

2020-05-19 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95211

--- Comment #2 from Arseny Solokha  ---
Uh-oh…

int s6;

void
ml (long int *ha, int dz)
{
  int iy[dz];
  int *tp;
  int cm;

  for (cm = 0; cm < 3; ++cm)
tp[cm] = ha[cm] + 1.0f;

  if (s6 == 0)
return;
}

[Bug middle-end/60479] convert_move assert failed

2020-05-19 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60479

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #2 from Arseny Solokha  ---
gcc 4.9 seems to be the last affected branch.

[Bug rtl-optimization/95211] New: [11 Regression] ICE in emit_unop_insn, at optabs.c:3622

2020-05-19 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95211

Bug ID: 95211
   Summary: [11 Regression] ICE in emit_unop_insn, at
optabs.c:3622
   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: asolokha at gmx dot com
  Target Milestone: ---
Target: x86_64-unknown-linux-gnu

gcc-11.0.0-alpha20200517 snapshot (g:2b9a271b2d0ba340234a138b7f8289bd7dca2fc5)
ICEs when compiling the following testcase w/ -march=skylake-avx512 -O3:

% x86_64-unknown-linux-gnu-gcc-11.0.0 -march=skylake-avx512 -O3 -c pvhda4vr.c
during RTL pass: expand
pvhda4vr.c: In function 'ml':
pvhda4vr.c:11:12: internal compiler error: in emit_unop_insn, at optabs.c:3622
   11 | tp[cm] = ha[cm] + 1.0f;
  | ~~~^~~
0x681295 emit_unop_insn(insn_code, rtx_def*, rtx_def*, rtx_code)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/optabs.c:3622
0x681dee emit_unop_insn(insn_code, rtx_def*, rtx_def*, rtx_code)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/optabs.c:4933
0x681dee expand_float(rtx_def*, rtx_def*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/optabs.c:4803
0xa1d278 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:9151
0xa2352a expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:10054
0xa2c184 expand_expr
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.h:282
0xa2c184 expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**,
rtx_def**, expand_modifier)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:7954
0xa1b878 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:8850
0xa2352a expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:10054
0xa1d19d expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:8358
0xa1d19d expand_normal
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.h:288
0xa1d19d expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:9136
0xa2352a expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:10054
0xa3056a expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:8358
0xa3056a expand_expr
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.h:282
0xa3056a expand_assignment(tree_node*, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/expr.c:5090
0x8fdf17 expand_gimple_stmt_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cfgexpand.c:3749
0x8fdf17 expand_gimple_stmt
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cfgexpand.c:3847
0x903b11 expand_gimple_basic_block
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cfgexpand.c:5887
0x9055f6 execute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cfgexpand.c:6571

[Bug c++/68372] [concepts] invalid use of pack expansion expression in member function template declaration

2020-05-19 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68372

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #6 from Arseny Solokha  ---
gcc 9 ICEs on both testcases, but newer versions accept it.

[Bug c++/82531] ICE: Segmentation fault (-std=c++1z -fconcepts)

2020-05-19 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82531

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #4 from Arseny Solokha  ---
The "ice" testcase in comment 3 ICEs on 9 branch, while gcc 10 and master
accept it.

[Bug c++/95193] New: [11 Regression] ICE in tsubst_decl, at cp/pt.c:14624

2020-05-18 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95193

Bug ID: 95193
   Summary: [11 Regression] ICE in tsubst_decl, at cp/pt.c:14624
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200517 snapshot (g:2b9a271b2d0ba340234a138b7f8289bd7dca2fc5)
ICEs when compiling the following testcase, extracted from
test/SemaCXX/cxx1z-lambda-star-this.cpp from the clang 10.0.0 test suite, w/
-std=c++17:

struct X {
  void foo() const {
auto GL1 = [*this](auto a) {
};

GL1("abc");
  }
};

% g++-11.0.0 -std=c++17 -c g5fztf1w.cpp
g5fztf1w.cpp: In instantiation of 'X::foo() const:: [with
auto:1 = const char*]':
g5fztf1w.cpp:6:14:   required from here
g5fztf1w.cpp:3:30: internal compiler error: in tsubst_decl, at cp/pt.c:14624
3 | auto GL1 = [*this](auto a) {
  |  ^
0x662811 tsubst_decl
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/pt.c:14624
0x9fa006 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/pt.c:17921
0x9f8267 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/pt.c:18138
0x9f536a instantiate_decl(tree_node*, bool, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/pt.c:25609
0x926d1a maybe_instantiate_decl
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/decl2.c:5377
0x929558 maybe_instantiate_decl
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/tree.h:3411
0x929558 mark_used(tree_node*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/decl2.c:5573
0x87afa3 build_over_call
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/call.c:9077
0x87ff91 build_op_call_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/call.c:4883
0x87ff91 build_op_call(tree_node*, vec**, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/call.c:4912
0xa3d83e finish_call_expr(tree_node*, vec**, bool,
bool, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/semantics.c:2692
0x9b3e51 cp_parser_postfix_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:7465
0x9958e9 cp_parser_binary_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:9559
0x99759e cp_parser_assignment_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:9864
0x997963 cp_parser_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:10032
0x99a918 cp_parser_expression_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:11692
0x9a5f73 cp_parser_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:11488
0x9a7828 cp_parser_statement_seq_opt
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:11839
0x9a7908 cp_parser_compound_statement
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:11789
0x9bfcf5 cp_parser_function_body
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:23058

[Bug c++/95063] [11 Regression] ICE in tsubst_decl, at cp/pt.c:14633

2020-05-18 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95063

--- Comment #6 from Arseny Solokha  ---
Is there more work pending, or can this PR be closed?

[Bug c++/95192] New: [11 Regression] ICE: tree check: expected tree_list, have error_mark in handle_assume_aligned_attribute, at c-family/c-attribs.c:2996

2020-05-18 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95192

Bug ID: 95192
   Summary: [11 Regression] ICE: tree check: expected tree_list,
have error_mark in handle_assume_aligned_attribute, at
c-family/c-attribs.c:2996
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200517 snapshot (g:2b9a271b2d0ba340234a138b7f8289bd7dca2fc5)
ICEs when compiling the following testcase, extracted from
test/SemaCXX/builtin-assume-aligned-tmpl.cpp from the clang 10.0.0 test suite:

template __attribute__((assume_aligned(sizeof(int(T()) T *f();
void test21() {
  void *p = f()
}

% g++-11.0.0 -c iu1wkpbg.cpp
iu1wkpbg.cpp: In substitution of 'template T* f() [with T = void]':
iu1wkpbg.cpp:3:21:   required from here
iu1wkpbg.cpp:1:75: internal compiler error: tree check: expected tree_list,
have error_mark in handle_assume_aligned_attribute, at
c-family/c-attribs.c:2996
1 | template __attribute__((assume_aligned(sizeof(int(T())
T *f();
  |
  ^
0x7c0c50 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/tree.c:9686
0x6af9db tree_check(tree_node*, char const*, int, char const*, tree_code)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/tree.h:3296
0x6af9db handle_assume_aligned_attribute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c-family/c-attribs.c:2996
0x6af9db handle_assume_aligned_attribute
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c-family/c-attribs.c:2977
0xa96507 decl_attributes(tree_node**, tree_node*, int, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/attribs.c:714
0x9236f7 cplus_decl_attributes(tree_node**, tree_node*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/decl2.c:1598
0xa178f4 tsubst_function_decl
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/pt.c:13929
0xa0196f tsubst_decl
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/pt.c:14182
0xa11b19 instantiate_template_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/pt.c:20678
0xa2137c instantiate_template(tree_node*, tree_node*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/pt.c:20735
0xa2137c fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/pt.c:21179
0x876223 add_template_candidate_real
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/call.c:3415
0x876cf6 add_template_candidate
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/call.c:3500
0x876cf6 add_candidates
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/call.c:5866
0x8771e7 add_candidates
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/call.c:4522
0x8771e7 perform_overload_resolution
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/call.c:4530
0x87eea5 build_new_function_call(tree_node*, vec**, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/call.c:4604
0xa3d1b4 finish_call_expr(tree_node*, vec**, bool,
bool, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/semantics.c:2675
0x9b3e51 cp_parser_postfix_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:7465
0x9958e9 cp_parser_binary_expression
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/cp/parser.c:9559

[Bug preprocessor/95183] [11 Regression] ICE: Segmentation fault (in _cpp_lex_direct)

2020-05-18 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95183

--- Comment #3 from Arseny Solokha  ---
(In reply to Nathan Sidwell from comment #2)
> This is a bug, but you're running a --traditional C preprocessor test
> through the c++ compiler, right?

Through the C compiler, but otherwise yes. I've posted the compiler invocation
in comment 0 verbatim.


> (A regular test run doesn't fail this test
> for me at least)

Yep, because trad.exp adds -traditional-cpp, as intended. But I don't run the
testsuite, but rather use its test cases as part of my larger test corpus,
compiling every individual case in that corpus with randomly chosen compiler
options. IOW, my testing ignores DejaGNU directives in gcc testsuite (which
means it also often ignores common sense when choosing compiler options, as a
consequence).

I can further describe my setup if you are interested, but it's off-topic in
this PR.

[Bug preprocessor/95183] New: [11 Regression] ICE: Segmentation fault (in _cpp_lex_direct)

2020-05-17 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95183

Bug ID: 95183
   Summary: [11 Regression] ICE: Segmentation fault (in
_cpp_lex_direct)
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200517 snapshot (g:2b9a271b2d0ba340234a138b7f8289bd7dca2fc5)
ICEs when compiling gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c:

% gcc-11.0.0 -c gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c
gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c:8:8: error: unterminated argument
list invoking macro "f"
8 | #if 2 f(/* { dg-error "-:unterminated" "unterminated macro in
directive" } */
  |^
gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c:8:7: error: missing binary operator
before token "f"
8 | #if 2 f(/* { dg-error "-:unterminated" "unterminated macro in
directive" } */
  |   ^
gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c:12: error: unterminated argument list
invoking macro "f"
   12 | f( /* { dg-error "-:unterminated" "unterminated macro" } */
  | 
gcc/testsuite/gcc.dg/cpp/trad/funlike-3.c:12:1: internal compiler error:
Segmentation fault
   12 | f( /* { dg-error "-:unterminated" "unterminated macro" } */
  | ^
0xd9b92f crash_signal
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/toplev.c:328
0x18578d3 _cpp_lex_direct
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/libcpp/lex.c:2733
0x18592e8 _cpp_lex_token
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/libcpp/lex.c:2611
0x1860877 cpp_get_token_1
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/libcpp/macro.c:2808
0x8784d0 c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c-family/c-lex.c:458
0x7f7a3a c_lex_one_token
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:270
0x7f8ac0 c_parser_peek_2nd_token(c_parser*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:491
0x7f8ac0 c_parser_peek_2nd_token(c_parser*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:484
0x820b9c c_parser_declaration_or_fndef
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:1893
0x82a893 c_parser_external_declaration
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:1745
0x82b3a9 c_parser_translation_unit
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:1618
0x82b3a9 c_parse_file()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c/c-parser.c:21746
0x8830fb c_common_parse_file()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200517/work/gcc-11-20200517/gcc/c-family/c-opts.c:1190

It's likely caused by g:2a0225e47868fbfceaecaa5e2de96c1c5a2251ea.

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

2020-05-16 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95171

Bug ID: 95171
   Summary: ICE: verify_flow_info failed (error: wrong outgoing
edge flags at end of bb 2)
   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: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200510 snapshot (g:13a46321516e2efd3bbb1f1899c539c6724240a9)
ICEs when compiling the following testcase w/ -fexceptions -ffinite-math-only
-fnon-call-exceptions (optionally, any optimization level except -Ofast can be
specified):

inline double __attribute__ ((always_inline))
w9 (int q2)
{
  return __builtin_fabs (__builtin_nan ("")) > 0.0 ? 1.0 : q2 / 1.0;
}

double __attribute__ ((optimize ("")))
o7 (int iz)
{
  int rj[1];

  (void) rj;

  return w9 (iz);
}

% gcc-11.0.0 -fexceptions -ffinite-math-only -fnon-call-exceptions -c
eqf0xkza.c
eqf0xkza.c:9:1: warning: bad option '-f' to attribute 'optimize' [-Wattributes]
9 | {
  | ^
eqf0xkza.c: In function 'o7':
eqf0xkza.c:15:1: error: wrong outgoing edge flags at end of bb 2
   15 | }
  | ^
during GIMPLE pass: einline
eqf0xkza.c:15:1: internal compiler error: verify_flow_info failed
0x9059a7 verify_flow_info()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cfghooks.c:269
0xde57d4 checking_verify_flow_info
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cfghooks.h:212
0xde57d4 cleanup_tree_cfg_noloop
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/tree-cfgcleanup.c:1114
0xde5dd8 cleanup_tree_cfg(unsigned int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/tree-cfgcleanup.c:1165
0xcb744c execute_function_todo
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/passes.c:1951
0xcb81ac do_per_function
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/passes.c:1640
0xcb81ac execute_todo
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/passes.c:2039

[Bug rtl-optimization/95123] [10/11 Regression] Wrong code w/ -O2 -fselective-scheduling2 -funroll-loops --param early-inlining-insns=5 --param loop-invariant-max-bbs-in-loop=3 --param max-jump-thread

2020-05-14 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95123

--- Comment #7 from Arseny Solokha  ---
(In reply to Alexander Monakov from comment #6)
> Oh, you're probably configuring your compiler with --enable-default-pie.
> Please paste the entire gcc -v. I can reproduce the miscompile it if I pass
> -fpie -pie.

% gcc-11.0.0 -v
Using built-in specs.
COLLECT_GCC=gcc-11.0.0
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-unknown-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/configure
--host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-unknown-linux-gnu/gcc-bin/11.0.0
--includedir=/usr/lib/gcc/x86_64-unknown-linux-gnu/11.0.0/include
--datadir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/11.0.0
--mandir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/11.0.0/man
--infodir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/11.0.0/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-unknown-linux-gnu/11.0.0/include/g++-v11
--with-python-dir=/share/gcc-data/x86_64-unknown-linux-gnu/11.0.0/python
--enable-languages=c,c++ --enable-obsolete --enable-secureplt --disable-werror
--with-system-zlib --disable-nls --enable-checking=yes --disable-esp
--enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --with-multilib-list=m64 --disable-altivec
--disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libmudflap --disable-libssp --disable-libada --disable-systemtap
--disable-vtable-verify --disable-libvtv --without-zstd --disable-libquadmath
--enable-lto --with-isl --disable-isl-version-check --disable-libsanitizer
--enable-default-pie --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20200510 (experimental) (GCC)

[Bug rtl-optimization/95123] [10/11 Regression] Wrong code w/ -O2 -fselective-scheduling2 -funroll-loops --param early-inlining-insns=5 --param loop-invariant-max-bbs-in-loop=3 --param max-jump-thread

2020-05-14 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95123

--- Comment #5 from Arseny Solokha  ---
OK, it works if I add -fPIC to the list of compiler options.

[Bug rtl-optimization/95123] [10/11 Regression] Wrong code w/ -O2 -fselective-scheduling2 -funroll-loops --param early-inlining-insns=5 --param loop-invariant-max-bbs-in-loop=3 --param max-jump-thread

2020-05-14 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95123

--- Comment #4 from Arseny Solokha  ---
(In reply to Martin Liška from comment #2)
> I can't reproduce that with the mentioned revision.
> Where does it segfault?

Program received signal SIGSEGV, Segmentation fault.
main () at iu1wkpbg.c:39
39qe (ip[xh]);
(gdb) disassemble 
Dump of assembler code for function main:

<…>

   0x461f <+159>:   je 0x45a0 
   0x4625 <+165>:   xor%ebp,%ebp
   0x4627 <+167>:   xor%edi,%edi
   0x4629 <+169>:   callq  0x47e0 
   0x462e <+174>:   cmp$0x2,%ebx
   0x4631 <+177>:   lea0x2a8(%rip),%rsi# 0x48e0

   0x4638 <+184>:   mov%ebp,%esi
   0x463a <+186>:   je 0x4650 
   0x463c <+188>:   add$0x1,%rbp
   0x4640 <+192>:   cmp$0x5,%rbp
   0x4644 <+196>:   je 0x466f 
=> 0x4646 <+198>:   mov(%rsi,%rbp,4),%edi
   0x4649 <+201>:   jmp0x4629 

<…>

(gdb) info registers rsi
rsi0x0 0

In a good version I see this instead:

 636:   8b 3c a8mov(%rax,%rbp,4),%edi

[Bug rtl-optimization/95123] [10/11 Regression] Wrong code w/ -O2 -fselective-scheduling2 -funroll-loops --param early-inlining-insns=5 --param loop-invariant-max-bbs-in-loop=3 --param max-jump-thread

2020-05-14 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95123

--- Comment #3 from Arseny Solokha  ---
(In reply to Alexander Monakov from comment #1)
> If you still have the compiler binary, you can help out by testing with
> sel-sched debug counters: if you append -fdbg-cnt=sel_sched_insn_cnt:0 to
> the "bad" command line, it should work again (as sel-sched will not move
> anything), with -fdbg-cnt=sel_sched_insn_cnt:9 it should fail. We use
> this for isolating a problematic transformation (by bisecting on the counter
> value).

It still works w/ counter value 79, starts failing at 80.

[Bug tree-optimization/48998] ICE: verify_flow_info failed: Wrong frequency of block 227 -161996 with -O3 --param max-completely-peeled-insns=5000 --param max-predicted-iterations=1

2020-05-14 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48998

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #1 from Arseny Solokha  ---
Is it still an issue?

[Bug rtl-optimization/95123] New: [10/11 Regression] Wrong code w/ -O2 -fselective-scheduling2 -funroll-loops --param early-inlining-insns=5 --param loop-invariant-max-bbs-in-loop=3 --param max-jump-t

2020-05-14 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95123

Bug ID: 95123
   Summary: [10/11 Regression] Wrong code w/ -O2
-fselective-scheduling2 -funroll-loops --param
early-inlining-insns=5 --param
loop-invariant-max-bbs-in-loop=3 --param
max-jump-thread-duplication-stmts=0
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: x86_64-unknown-linux-gnu

The following program, compiled w/ gcc-11.0.0-alpha20200510 snapshot
(g:13a46321516e2efd3bbb1f1899c539c6724240a9) w/ -O2 -fselective-scheduling2
-funroll-loops --param early-inlining-insns=5 --param
loop-invariant-max-bbs-in-loop=3 --param max-jump-thread-duplication-stmts=0,
segfauls on run-time:

int ak, mt;
const int g5[1] = { -1 }, ip[5] = { 0 };
unsigned int eu;

void
cm (unsigned char t9)
{
  (void) t9;
  eu = (eu & (~0 - 1)) + ip[eu + 1 > 1];
}

void
qe (unsigned int nc)
{
  cm (nc);
  cm (nc);
  cm (nc);
  asm ("");
  cm (nc);
}

int
main (void)
{
  int xh, bc = mt == 2;

  mt = ak;

  for (xh = 0; xh < 1; ++xh)
{
  qe (g5[xh]);
  asm (";");
  if (!!bc)
__builtin_puts ("");
}

  for (xh = 0; xh < 5; ++xh)
{
  qe (ip[xh]);
  asm (";");
  if (!!bc)
__builtin_printf ("%d\n", xh);

}

  for (xh = 0; xh < 3; ++xh)
{
  qe (ip[xh]);
  if (!!bc)
mt += xh;
}

  return 0;
}

% x86_64-unknown-linux-gnu-gcc-11.0.0 -O2 -fselective-scheduling2 --param
early-inlining-insns=5 --param loop-invariant-max-bbs-in-loop=3 --param
max-jump-thread-duplication-stmts=0 -o good cd8zuepp.c
% ./good
% echo $?
0

% x86_64-unknown-linux-gnu-gcc-11.0.0 -O2 -fselective-scheduling2
-funroll-loops --param early-inlining-insns=5 --param
loop-invariant-max-bbs-in-loop=3 --param max-jump-thread-duplication-stmts=0 -o
bad cd8zuepp.c
% ./bad 
zsh: segmentation fault (core dumped)  ./bad

[Bug tree-optimization/95113] [10/11 Regression] Wrong code w/ -O2 -fexceptions -fnon-call-exceptions

2020-05-13 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95113

--- Comment #3 from Arseny Solokha  ---
(In reply to Jakub Jelinek from comment #2)
> Guess dup of the other PR where the IPA opts assume DCE which doesn't really
> happen (the *p load result is never used).

Indeed, -fno-ipa-sra fixes it. So, a duplicate of PR93385?

[Bug tree-optimization/95113] New: [10/11 Regression] Wrong code w/ -O2 -fexceptions -fnon-call-exceptions

2020-05-13 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95113

Bug ID: 95113
   Summary: [10/11 Regression] Wrong code w/ -O2 -fexceptions
-fnon-call-exceptions
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---
Target: x86_64-unknown-linux-gnu

The following program compiled w/ gcc-11.0.0-alpha20200510 snapshot
(g:13a46321516e2efd3bbb1f1899c539c6724240a9) w/ -O2 -fexceptions
-fnon-call-exceptions:

int p4, cd;

static long int
sg (long int kl, int mp)
{
  if (mp == 0)
return 0;

  if (kl == -1 && mp == -1)
return 0;

  return kl / mp;
}

static int
eo (int *yg)
{
  int du;

  du = sg (p4, 1) + *yg;
  (void) du;

  return cd;
}

int
main (void)
{
  int um = 0;

  cd = sg (1, 1);
  eo ();

  return 0;
}

% x86_64-unknown-linux-gnu-gcc-11.0.0 -O2 -fexceptions -Wuninitialized -o good
li6hfrrz.c
% ./good
% echo $?
0
% objdump --section=.text --disassemble=main good | tail -n6

04e0 :
 4e0:   c7 05 32 1b 00 00 01movl   $0x1,0x1b32(%rip)# 201c 
 4e7:   00 00 00
 4ea:   31 c0   xor%eax,%eax
 4ec:   c3  retq

% x86_64-unknown-linux-gnu-gcc-11.0.0 -O2 -fexceptions -fnon-call-exceptions
-Wuninitialized -o bad li6hfrrz.c
% ./bad
zsh: segmentation fault (core dumped)  ./bad
% objdump --section=.text --disassemble=main bad | tail -n6
04e0 :
 4e0:   c7 05 32 1b 00 00 01movl   $0x1,0x1b32(%rip)# 201c 
 4e7:   00 00 00
 4ea:   8b 04 25 00 00 00 00mov0x0,%eax
 4f1:   31 c0   xor%eax,%eax
 4f3:   c3  retq

https://gcc.godbolt.org/z/V4a-K7

[Bug libgomp/68033] OpenMP: ICE with teams distribute

2020-05-12 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68033

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #3 from Arseny Solokha  ---
Both testcases are accepted by gcc 8 and newer.

[Bug middle-end/44665] typo in comment, incorrect/out-of-date comment

2020-05-12 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44665

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #3 from Arseny Solokha  ---
I believe this PR can be finally closed.

[Bug c++/95087] New: [11 Regression] ICE in gimplify_expr, at gimplify.c:14382

2020-05-12 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95087

Bug ID: 95087
   Summary: [11 Regression] ICE in gimplify_expr, at
gimplify.c:14382
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-11.0.0-alpha20200510 snapshot (g:13a46321516e2efd3bbb1f1899c539c6724240a9)
ICEs when compiling
gcc/testsuite/g++.dg/coroutines/co-return-syntax-08-bad-return.C w/
-fcoroutines:

% g++-11.0.0 -fcoroutines -c
gcc/testsuite/g++.dg/coroutines/co-return-syntax-08-bad-return.C
gcc/testsuite/g++.dg/coroutines/co-return-syntax-08-bad-return.C: In function
'Coro bar()':
gcc/testsuite/g++.dg/coroutines/co-return-syntax-08-bad-return.C:37:1: error: a
'return' statement is not allowed in coroutine; did you mean 'co_return'?
   37 | bar () // { dg-error {a 'return' statement is not allowed} }
  | ^~~
gcc/testsuite/g++.dg/coroutines/co-return-syntax-08-bad-return.C:42:5: internal
compiler error: in gimplify_expr, at gimplify.c:14382
   42 | co_return;
  | ^
0x700e91 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/gimplify.c:14382
0xd5871b gimplify_cleanup_point_expr
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/gimplify.c:6802
0xd3f9c5 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/gimplify.c:13977
0xd42c46 gimplify_stmt(tree_node**, gimple**)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/gimplify.c:6802
0xd5549a gimplify_cond_expr
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/gimplify.c:4256
0xd3f9e2 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/gimplify.c:13542
0xd57c8b gimplify_stmt(tree_node**, gimple**)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/gimplify.c:6802
0xd57c8b gimplify_body(tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/gimplify.c:14834
0xd580fd gimplify_function_tree(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/gimplify.c:14988
0xb96967 cgraph_node::analyze()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cgraphunit.c:670
0xb99587 analyze_functions
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cgraphunit.c:1227
0xb9a152 symbol_table::finalize_compilation_unit()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cgraphunit.c:2971

[Bug c++/95063] New: [11 Regression] ICE in tsubst_decl, at cp/pt.c:14633

2020-05-11 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95063

Bug ID: 95063
   Summary: [11 Regression] ICE in tsubst_decl, at cp/pt.c:14633
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.0-alpha20200510 snapshot (g:13a46321516e2efd3bbb1f1899c539c6724240a9)
ICEs when compiling the following testcase, extracted from
test/OpenMP/for_ast_print.cpp from the clang 10.0.0 test suite, w/ -fopenmp:

struct S {
  S(): a(0) {}
  S(int v) : a(v) {}
  int a;
  typedef int type;
};

template 
class S7 : public T {
protected:
  T a;
  T 
  typename T::type c:12;
  typename T::type 

public:
  S7(typename T::type v) : a(v), b(a), c(v), d(a.a) {
#pragma omp for linear(val(c))
for (int k = 0; k < a.a; ++k)
  ++this->a.a;
  }
};

class S8 : public S7 {
public:
  S8(int v) : S7(v) {
  }
};

% g++-11.0.0 -fopenmp -c epvsqux2.cpp
epvsqux2.cpp: In constructor 'S7::S7(typename T::type)':
epvsqux2.cpp:18:28: error: modifier should not be specified in 'linear' clause
on 'simd' or 'for' constructs
   18 | #pragma omp for linear(val(c))
  |^
epvsqux2.cpp: In instantiation of 'S7::S7(typename T::type) [with T = S;
typename T::type = int]':
epvsqux2.cpp:26:22:   required from here
epvsqux2.cpp:18:31: internal compiler error: in tsubst_decl, at cp/pt.c:14633
   18 | #pragma omp for linear(val(c))
  |   ^
0x6607d0 tsubst_decl
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cp/pt.c:14633
0x9f6fa6 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cp/pt.c:17938
0x9f4ea0 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cp/pt.c:17836
0x9f51f7 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cp/pt.c:18155
0x9f4ea0 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cp/pt.c:17836
0x9f51f7 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cp/pt.c:18155
0x9f22fa instantiate_decl(tree_node*, bool, bool)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cp/pt.c:25708
0xa2335b instantiate_pending_templates(int)
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cp/pt.c:25824
0x9276e3 c_parse_final_cleanups()
   
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20200510/work/gcc-11-20200510/gcc/cp/decl2.c:4889

clang++ 10.0.0 accepts this code.

[Bug tree-optimization/90668] loop invariant moving a dependent store out of a loop

2020-05-11 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90668

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #4 from Arseny Solokha  ---
I cannot reproduce it anymore on x86_64 w/ gcc-11.0.0-alpha20200510 snapshot
(g:13a46321516e2efd3bbb1f1899c539c6724240a9), while gcc 9 and 10 are still
affected.

[Bug analyzer/95042] New: ICE in can_merge_p, at analyzer/region-model.cc:2053

2020-05-10 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95042

Bug ID: 95042
   Summary: ICE in can_merge_p, at analyzer/region-model.cc:2053
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: analyzer
  Assignee: dmalcolm at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-10.1.0-RC-20200430 ICEs when compiling the following testcase w/ -O1
-fanalyzer:

class kz {
public:
  kz ();

private:
  int yu;
};

const kz vl;
kz ax;

void
c1 (bool va, bool ze)
{
  kz ny, fb = vl;

  if (va)
{
  if (ze)
ny = vl;

  fb = ny;
}

  ax = fb;
}

% g++-10.1.0 -O1 -fanalyzer -c qjxbb0xt.cpp
during IPA pass: analyzer
qjxbb0xt.cpp: In function 'void c1(bool, bool)':
qjxbb0xt.cpp:22:10: internal compiler error: in can_merge_p, at
analyzer/region-model.cc:2053
   22 |   fb = ny;
  |   ~~~^~~~
0x7e1592 ana::map_region::can_merge_p(ana::map_region const*, ana::map_region
const*, ana::map_region*, ana::region_id, ana::model_merger*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/region-model.cc:2053
0x13714a2 ana::map_region::can_merge_p(ana::map_region const*, ana::map_region
const*, ana::map_region*, ana::region_id, ana::model_merger*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/region-model.cc:2085
0x1371a5f ana::stack_region::can_merge_p(ana::stack_region const*,
ana::stack_region const*, ana::model_merger*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/region-model.cc:2904
0x1371dfc ana::stack_region::can_merge_p(ana::stack_region const*,
ana::stack_region const*, ana::model_merger*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/vec.h:1411
0x1371dfc ana::root_region::can_merge_p(ana::root_region const*,
ana::root_region const*, ana::root_region*, ana::model_merger*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/region-model.cc:3311
0x1371f42 ana::region_model::can_merge_with_p(ana::region_model const&,
ana::region_model*, ana::svalue_id_merger_mapping*) const
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/region-model.cc:6823
0x135f09e ana::program_state::can_merge_with_p(ana::program_state const&,
ana::extrinsic_state const&, ana::program_state*) const
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/program-state.cc:1011
0x134d1db ana::exploded_graph::get_or_create_node(ana::program_point const&,
ana::program_state const&, ana::state_change*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/engine.cc:1970
0x1350b42 ana::exploded_graph::process_node(ana::exploded_node*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/engine.cc:2547
0x135131a ana::exploded_graph::process_worklist()
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/engine.cc:2348
0x1351a4b ana::impl_run_checkers(ana::logger*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/engine.cc:4029
0x135261c ana::run_checkers()
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/engine.cc:4097
0x13471b8 execute
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/analyzer/analyzer-pass.cc:84

[Bug target/81319] ICE in output_operand_lossage at final.c

2020-05-10 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81319

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #2 from Arseny Solokha  ---
This is a duplicate of PR92469.

[Bug target/57814] gcc.target/powerpc/pr46728-* test failures for eabi targets

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57814

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #3 from Arseny Solokha  ---
This PR seems to be basically a duplicate of PR57816.

[Bug tree-optimization/91010] ICE: Segmentation fault (in location_wrapper_p)

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91010

Arseny Solokha  changed:

   What|Removed |Added

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

--- Comment #5 from Arseny Solokha  ---
g++ 9 emits "sorry, unimplemented", so obviously there's no backport pending.

[Bug c++/79627] Ice with type of VLA in lambda

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79627

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #3 from Arseny Solokha  ---
It is fixed for gcc 10, probably by g:00a49cd840f60774b0e9e0109fb10559bc9a9194.

[Bug tree-optimization/88970] ICE: verify_ssa failed (error: definition in block 2 follows the use)

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88970

Arseny Solokha  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Known to work||10.1.0
 Resolution|--- |DUPLICATE

--- Comment #4 from Arseny Solokha  ---
Indeed, it's a duplicate of PR86216.

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

[Bug c++/86216] g++ ICE on valid code: verify_ssa failed

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86216

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #11 from Arseny Solokha  ---
*** Bug 88970 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/86725] ICE: Segmentation fault (in vect_get_vec_def_for_operand_1)

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86725

--- Comment #5 from Arseny Solokha  ---
So only gcc 8 branch is currently affected.

[Bug rtl-optimization/85099] [meta-bug] selective scheduling issues

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85099
Bug 85099 depends on bug 85876, which changed state.

Bug 85876 Summary: ICE in move_op_ascend, at sel-sched.c:6164
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85876

   What|Removed |Added

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

[Bug rtl-optimization/85876] ICE in move_op_ascend, at sel-sched.c:6164

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85876

Arseny Solokha  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Known to work||9.1.0
 Status|ASSIGNED|RESOLVED
  Known to fail|8.1.0, 9.0  |8.3.0

--- Comment #4 from Arseny Solokha  ---
Fixed, according to comment 3.

[Bug rtl-optimization/91161] [9/10/11 Regression] ICE in begin_move_insn, at sched-ebb.c:175

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91161

--- Comment #6 from Arseny Solokha  ---
I cannot reproduce it on master and w/ gcc-10.1.0-RC-20200430, regardless of
-checking. It still fails on the 9 branch w/ -fchecking.

[Bug rtl-optimization/84206] ICE in get_all_loop_exits, at sel-sched-ir.h:1138

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84206

Arseny Solokha  changed:

   What|Removed |Added

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

--- Comment #4 from Arseny Solokha  ---
Fixed, according to comment 3.

[Bug rtl-optimization/85099] [meta-bug] selective scheduling issues

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85099
Bug 85099 depends on bug 84206, which changed state.

Bug 84206 Summary: ICE in get_all_loop_exits, at sel-sched-ir.h:1138
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84206

   What|Removed |Added

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

[Bug tree-optimization/89963] [GRAPHITE] Compile-time hog when compiling gcc/testsuite/gcc.dg/autopar/uns-outer-6.c

2020-05-08 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89963

--- Comment #3 from Arseny Solokha  ---
I cannot reproduce it w/ gcc-10.1.0-RC-20200430 or gcc 9.3, gmp 6.2.0, and isl
0.22.1.

[Bug c/94902] internal compiler error: output_operand: invalid use of register 'frame'

2020-05-04 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94902

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #2 from Arseny Solokha  ---
I can reproduce it on x86_64, and it seems to be a [9/10/11 Regression].

[Bug c++/94905] Bogus warning -Werror=maybe-uninitialized

2020-05-03 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

--- Comment #6 from Arseny Solokha  ---
Thank you.

(In reply to Dr. Jürgen Sauermann from comment #5)
> Not sure how I can create a testcase file other than preprocessing or
> minimizing it.

Of course preprocessing is what you've been asked to do. It is stressed in the
bug filing instructions[1].

[1] https://gcc.gnu.org/bugs

[Bug c++/94905] Bogus warning -Werror=maybe-uninitialized

2020-05-03 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94905

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #3 from Arseny Solokha  ---
The best I've been able to come up with is the following, reduced from APL 1.8:

enum { MAX_RANK = 8 };

struct Shape {
  Shape(int len) { rho[0] = len; }

  Shape(Shape ) {
for (int r = 0; r < MAX_RANK; ++r)
  rho[r] = other.rho[r];
  }

  Shape insert_axis() const;

  int rho[MAX_RANK];
};

int insert_axis_len;

Shape Shape::insert_axis() const {
  {
Shape ret(insert_axis_len);
return ret;
  }
}

% g++-10.1.0 -O2 -Wall -Werror -c fojcdnsn.cc
fojcdnsn.cc: In member function 'Shape Shape::insert_axis() const':
fojcdnsn.cc:8:27: error: ''target_mem_ref' not supported by
dump_expr' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
8 |   rho[r] = other.rho[r];
  |~~~^

That's with gcc-10.1.0-RC-20200430; I failed to reproduce it at all with gcc 9.
However, without preprocessed source provided by the reporter it's impossible
to tell whether that's the issue in question.

So please, provide a self-contained testcase! It's not even necessary to
minimize it, as in many cases it's easy to do with tools like C-Reduce or newly
emerged C-Vise and can later be done by developers themselves. But without the
testcase developers cannot and likely won't do anything about the issue you
have in the first place.

[Bug c++/94932] New: ICE in ovl_skip_hidden, at cp/tree.c:2292

2020-05-03 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94932

Bug ID: 94932
   Summary: ICE in ovl_skip_hidden, at cp/tree.c:2292
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-10.1.0-RC20200430 ICEs when compiling the following testcase, extracted
from clang/testsuite/CXX/except/except.spec/p11-2a.cpp from the clang 10.0.0
test suite, w/ -std=c++2a:

namespace std {
  struct strong_ordering {
  };
}

namespace Synth {
  struct A {
friend bool operator==(A, A) noexcept;
friend bool operator<(A, A) noexcept;
  };
  struct B {
A a;
friend std::strong_ordering operator<=>(B, B) = default;
  };
  std::strong_ordering operator<=>(B, B) noexcept;
}

% g++-10.1.0 -std=c++2a -c xwwacly6.cpp
xwwacly6.cpp: In function 'constexpr std::strong_ordering
Synth::operator<=>(Synth::B, Synth::B)':
xwwacly6.cpp:13:33: internal compiler error: in ovl_skip_hidden, at
cp/tree.c:2292
   13 | friend std::strong_ordering operator<=>(B, B) = default;
  | ^~~~
0x686390 ovl_skip_hidden(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/tree.c:2292
0x96f343 name_lookup::process_binding(tree_node*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/name-lookup.c:497
0x97600b name_lookup::search_unqualified(tree_node*, cp_binding_level*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/name-lookup.c:705
0x977f1c lookup_name_real_1
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/name-lookup.c:6555
0x9780f6 lookup_name_real(tree_node*, int, int, bool, int, int)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/name-lookup.c:6574
0x8746a6 add_operator_candidates
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/call.c:5955
0x87b68e build_new_op_1
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/call.c:6180
0x87c2ed build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node**, int)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/call.c:6570
0x963d2e build_comparison_op
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/method.c:1373
0x9652d9 synthesize_method(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/method.c:1550
0xa02bca maybe_instantiate_noexcept(tree_node*, int)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/pt.c:25189
0x8e9469 check_redeclaration_exception_specification
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/decl.c:1184
0x8fd259 duplicate_decls(tree_node*, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/decl.c:2202
0x979360 do_pushdecl
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/name-lookup.c:3048
0x97c1c2 pushdecl(tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/name-lookup.c:3177
0x97c1c2 maybe_push_decl(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/name-lookup.c:3208
0x90e151 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/decl.c:5400
0x9be161 cp_parser_init_declarator
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:20766
0x99e906 cp_parser_simple_declaration
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:13734
0x9c8ff2 cp_parser_declaration
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:13433

[Bug c++/94907] New: ICE: Segmentation fault (in check_return_expr)

2020-05-01 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94907

Bug ID: 94907
   Summary: ICE: Segmentation fault (in check_return_expr)
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc-10.1.0-RC20200430 ICEs when compiling the following testcase, extracted
from test/CXX/class/class.compare/class.compare.default/p4.cpp from the clang
10.0.0 test suite, w/ -std=c++2a:

namespace std {
  struct strong_ordering {
  };
}

struct E;

struct D {
  virtual std::strong_ordering operator<=>(const struct E&) const = 0;
};
struct E : D {
  std::strong_ordering operator<=>(const E&) const override = default;
};

% g++-10.1.0 -std=c++2a -c wwmk0dwc.cpp
wwmk0dwc.cpp: In member function 'virtual constexpr std::strong_ordering
E::operator<=>(const E&) const':
wwmk0dwc.cpp:12:24: internal compiler error: Segmentation fault
   12 |   std::strong_ordering operator<=>(const E&) const override = default;
  |^~~~
0xfed34f crash_signal
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/toplev.c:328
0xa8008a check_return_expr(tree_node*, bool*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/typeck.c:9924
0xa32b5f finish_return_stmt(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/semantics.c:956
0x964803 build_comparison_op
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/method.c:1445
0x9652d9 synthesize_method(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/method.c:1550
0x892e02 check_bases_and_members
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/class.c:6002
0x89725b finish_struct_1(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/class.c:7216
0x898ca4 finish_struct(tree_node*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/class.c:7520
0x99abb3 cp_parser_class_specifier_1
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:23881
0x99cc5b cp_parser_class_specifier
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:24180
0x99cc5b cp_parser_type_specifier
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:17711
0x99dd65 cp_parser_decl_specifier_seq
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:14359
0x99e804 cp_parser_simple_declaration
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:13613
0x9c8ff2 cp_parser_declaration
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:13433
0x9c978f cp_parser_translation_unit
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:4734
0x9c978f c_parse_file()
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/cp/parser.c:43975
0xae268b c_common_parse_file()
   
/var/tmp/portage/sys-devel/gcc-10.1.0_rc20200430/work/gcc-10.1.0-RC-20200430/gcc/c-family/c-opts.c:1190

[Bug middle-end/94895] New: ICE in expand_block_tm, at trans-mem.c:2643

2020-04-30 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94895

Bug ID: 94895
   Summary: ICE in expand_block_tm, at trans-mem.c:2643
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code, trans-mem
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

All g++ releases from g++-10.0.1-alpha20200426 snapshot
(g:29f55115583a0dab6cbac749c4f0804fd88e9536) down to 4.7 ICE when compiling
gcc/testsuite/g++.dg/tm/pr46269.C w/ -O1 -fgnu-tm --param
max-early-inliner-iterations=0:

% g++-10.0.1 -O1 -fgnu-tm --param max-early-inliner-iterations=0 -c
gcc/testsuite/g++.dg/tm/pr46269.C
during GIMPLE pass: tmmark  
gcc/testsuite/g++.dg/tm/pr46269.C: In member function 'void
BuildingCompletedEvent::updateBuildingSite()':
gcc/testsuite/g++.dg/tm/pr46269.C:25:6: internal compiler error: in
expand_block_tm, at trans-mem.c:2643
   25 | void BuildingCompletedEvent::updateBuildingSite(void)
  |  ^~
0x754004 expand_block_tm
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/trans-mem.c:2643
0x754004 execute_tm_mark
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/trans-mem.c:3116
0x754004 execute
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/trans-mem.c:3161

[Bug tree-optimization/64072] wrong cgraph node profile count

2020-04-29 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64072

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #1 from Arseny Solokha  ---
Is it still an issue?

[Bug ipa/94856] New: [10 Regression] ICE: Segmentation fault (in clone_of_p); or ICE: verify_cgraph_node failed (error: edge points to wrong declaration)

2020-04-29 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94856

Bug ID: 94856
   Summary: [10 Regression] ICE: Segmentation fault (in
clone_of_p); or ICE: verify_cgraph_node failed (error:
edge points to wrong declaration)
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

1.

g++-10.0.1-alpha20200426 snapshot (g:29f55115583a0dab6cbac749c4f0804fd88e9536)
ICEs when compiling gcc/testsuite/g++.dg/other/pr47218.C w/ -O2 -fgnu-tm
-fopenacc -fno-tree-dse --param early-inlining-insns=3 --param
uninlined-function-insns=0:

% g++-10.0.1 -O2 -fgnu-tm -fopenacc -fno-tree-dse --param
early-inlining-insns=3 --param uninlined-function-insns=0 -c
gcc/testsuite/g++.dg/other/pr47218.C
during IPA pass: inline
gcc/testsuite/g++.dg/other/pr47218.C: In destructor 'virtual Foo3::~Foo3()':
gcc/testsuite/g++.dg/other/pr47218.C:10:1: internal compiler error:
Segmentation fault
   10 | }
  | ^
0xfebacf crash_signal
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/toplev.c:328
0xb85dd9 clone_of_p
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cgraph.c:3108
0xb85dd9 cgraph_edge::verify_corresponds_to_fndecl(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cgraph.c:3196
0xb8d780 cgraph_node::verify_node()
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cgraph.c:3719
0xb7fcf4 symtab_node::verify()
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/symtab.c:1312
0x1074525 expand_call_inline
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/tree-inline.c:4820
0x1076ee9 gimple_expand_calls_inline
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/tree-inline.c:5251
0x1076ee9 optimize_inline_calls(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/tree-inline.c:5424
0xddbef3 inline_transform(cgraph_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/ipa-inline-transform.c:734
0xf182dd execute_one_ipa_transform_pass
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/passes.c:2233
0xf182dd execute_all_ipa_transforms(bool)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/passes.c:2272
0xb86644 cgraph_node::get_body()
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cgraph.c:3970
0x11df6f1 ipa_pta_execute
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/tree-ssa-structalias.c:8140
0x11df6f1 execute
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/tree-ssa-structalias.c:8557

2.

Omission of -fopenacc from the command line yields the following instead:

% g++-10.0.1 -O2 -fgnu-tm -fno-tree-dse --param early-inlining-insns=3 --param
uninlined-function-insns=0 -c gcc/testsuite/g++.dg/other/pr47218.C
gcc/testsuite/g++.dg/other/pr47218.C: In destructor 'Foo3::~Foo3()':
gcc/testsuite/g++.dg/other/pr47218.C:7:1: error: edge points to wrong
declaration:
7 | Foo3::~Foo3 ()
  | ^~~~
 >
QI
size 
unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f81105887e0
arg-types >>
readonly addressable asm_written used nothrow static decl_5 QI
gcc/testsuite/g++.dg/other/pr47218.C:12:6 align:16 warn_if_not_align:0 context
 initial 
abstract_origin 
(mem:QI (symbol_ref:DI ("_ZN4Foo33BarEv.constprop.0") [flags 0x3]
) [0  S1 A8])>
 Instead of: >
QI
size 
unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f8110570690 method basetype 
arg-types 
chain >>
pointer_to_this >
readonly addressable used nothrow public ignored virtual decl_5 QI
gcc/testsuite/g++.dg/other/pr47218.h:32:16 align:8 warn_if_not_align:0 context
 initial 
result 
ignored VOID gcc/testsuite/g++.dg/other/pr47218.C:19:1
align:8 warn_if_not_align:0 context >
full-name "virtual void Foo3::_ZThn8_N4Foo33BarEv()"

arguments 
readonly public unsigned DI
size 
unit-size 
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f8110570a80>
readonly unsigned read DI gcc/testsuite/g++.dg/other/pr47218.C:12:16
size  unit-size 
align:64 warn_if_not_align:0 context  arg-type >
struct-function 0x7f8110561bb0>

[Bug c++/94829] New: ICE in poplevel, at cp/decl.c:585

2020-04-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94829

Bug ID: 94829
   Summary: ICE in poplevel, at cp/decl.c:585
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

Created attachment 48395
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48395=edit
Testcase

g++-10.0.1-alpha20200426 snapshot (g:29f55115583a0dab6cbac749c4f0804fd88e9536)
ICEs when compiling the attached testcase w/ -fcoroutines:

% g++-10.0.1 -fcoroutines -c clang/test/CodeGenCoroutines/coro-lambda.cpp
clang/test/CodeGenCoroutines/coro-lambda.cpp: In instantiation of 'auto
SyncAwait(_AwrT&&) [with _AwrT = suspend_always&]':
clang/test/CodeGenCoroutines/coro-lambda.cpp:50:17:   required from here
clang/test/CodeGenCoroutines/coro-lambda.cpp:41:20: error: coroutines require a
traits template; cannot find 'std::coroutine_traits'
   41 |   try { (void)(co_await A); } catch (...) {}
  |   ~^~~
clang/test/CodeGenCoroutines/coro-lambda.cpp:41:20: note: perhaps '#include
' is missing
clang/test/CodeGenCoroutines/coro-lambda.cpp:43:26: internal compiler error: in
poplevel, at cp/decl.c:585
   43 | Task t = AwaitAsync();
  |  ^
0x6138a0 poplevel(int, int, int)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/decl.c:585
0xa2ecab do_poplevel(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/semantics.c:453
0xa329d9 finish_compound_stmt(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/semantics.c:1542
0x9f38c0 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/pt.c:18145
0x9f3f7b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/pt.c:18109
0x9f1312 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/pt.c:17821
0x9f1662 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/pt.c:18140
0x9ee76a instantiate_decl(tree_node*, bool, bool)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/pt.c:25688
0x91fbda maybe_instantiate_decl
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/decl2.c:5370
0x922418 maybe_instantiate_decl
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/tree.h:3402
0x922418 mark_used(tree_node*, int)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/decl2.c:5577
0x875e72 build_over_call
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/call.c:9048
0x87800c build_new_function_call(tree_node*, vec**, int)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/call.c:4599
0xa36734 finish_call_expr(tree_node*, vec**, bool,
bool, int)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/semantics.c:2672
0x9ad191 cp_parser_postfix_expression
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:7468
0x98eb69 cp_parser_binary_expression
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:9557
0x99081e cp_parser_assignment_expression
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:9862
0x990be3 cp_parser_expression
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:10030
0x993c38 cp_parser_expression_statement
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:11691
0x99f253 cp_parser_statement
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:11487

The testcase is unmodified test/CodeGenCoroutines/coro-lambda.cpp from the
clang 10.0.0 testsuite. clang++ 9.0.1 accepts it. I don't really see much
opportunities for reduction here.

[Bug c++/94817] New: ICE in add_stmt, at cp/semantics.c:392

2020-04-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94817

Bug ID: 94817
   Summary: ICE in add_stmt, at cp/semantics.c:392
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-10.0.1-alpha20200426 snapshot (g:29f55115583a0dab6cbac749c4f0804fd88e9536)
ICEs when compiling the following testcase, extracted from
clang/testsuite/SemaCXX/coroutines.cpp from the clang 10.0.0 test suite, w/
-fcoroutines:

void no_coroutine_traits() {
  co_await 4;
}

template 
struct void_t_imp {
  using type = void;
};

% g++-10.0.1 -fcoroutines -c e96qfdep.cpp
e96qfdep.cpp: In function 'void no_coroutine_traits()':
e96qfdep.cpp:2:3: error: coroutines require a traits template; cannot find
'std::coroutine_traits'
2 |   co_await 4;
  |   ^~~~
e96qfdep.cpp:2:3: note: perhaps '#include ' is missing
e96qfdep.cpp:8:1: internal compiler error: in add_stmt, at cp/semantics.c:392
8 | };
  | ^
0x678153 add_stmt(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/semantics.c:392
0x89887a finish_struct(tree_node*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/class.c:7563
0x999413 cp_parser_class_specifier_1
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:23881
0x99b4bb cp_parser_class_specifier
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:24180
0x99b4bb cp_parser_type_specifier
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:17711
0x99c5c5 cp_parser_decl_specifier_seq
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:14359
0x9c3c78 cp_parser_single_declaration
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:29396
0x9c402c cp_parser_template_declaration_after_parameters
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:29059
0x9c4790 cp_parser_explicit_template_declaration
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:29325
0x9c79a9 cp_parser_declaration
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:13382
0x9c7fef cp_parser_translation_unit
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:4734
0x9c7fef c_parse_file()
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/cp/parser.c:43975
0xae0edb c_common_parse_file()
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/c-family/c-opts.c:1190

[Bug analyzer/94816] New: ICE: Segmentation fault (in ana::region_model::add_region_for_type)

2020-04-28 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94816

Bug ID: 94816
   Summary: ICE: Segmentation fault (in
ana::region_model::add_region_for_type)
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: analyzer
  Assignee: dmalcolm at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-10.0.1-alpha20200426 snapshot (g:29f55115583a0dab6cbac749c4f0804fd88e9536)
ICEs when compiling the following testcase, reduced from
gcc/testsuite/g++.dg/init/array51.C, w/ -O1 -fanalyzer:

struct jr;

struct ch {
  int jr::*rx;
};

ch
ad ()
{
  return ch ();
}

% g++-10.0.1 -O1 -fanalyzer -c noivoaih.C
during IPA pass: analyzer
noivoaih.C: In function 'ch ad()':
noivoaih.C:10:14: internal compiler error: Segmentation fault
   10 |   return ch ();
  |  ^
0xfebacf crash_signal
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/toplev.c:328
0x136769e ana::region_model::add_region_for_type(ana::region_id, tree_node*,
ana::region_model_context*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/analyzer/region-model.cc:6491
0x136d918 ana::map_region::get_or_create(ana::region_model*, ana::region_id,
tree_node*, tree_node*, ana::region_model_context*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/analyzer/region-model.cc:1832
0x136ec2e ana::region_model::copy_struct_region(ana::region_id,
ana::struct_region*, ana::struct_region*, ana::region_model_context*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/analyzer/region-model.cc:1304
0x134e9d1 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode
const*, gimple const*, ana::program_state*, ana::state_change*) const
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/analyzer/engine.cc:1022
0x134f3e1 ana::exploded_graph::process_node(ana::exploded_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/analyzer/engine.cc:2530
0x134f8ca ana::exploded_graph::process_worklist()
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/analyzer/engine.cc:2348
0x134fffb ana::impl_run_checkers(ana::logger*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/analyzer/engine.cc:4029
0x1350bcc ana::run_checkers()
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/analyzer/engine.cc:4097
0x1345778 execute
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200426/work/gcc-10-20200426/gcc/analyzer/analyzer-pass.cc:84

[Bug c/94780] [8/9/10 Regression] ICE in walk_body at gcc/tree-nested.c:713 since r6-3632-gf6f69fb09c5f81df

2020-04-27 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94780

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #3 from Arseny Solokha  ---
Can it be caused by the same underlying issue as PR88134 (though I'm the only
one who can reproduce the latter)? BTW, the only difference between the
testcases, backends aside, is that nested 'unsigned int bar (int s) { return 
s;}'.

[Bug c/94746] -Wsizeof-pointer-div not triggered by system header macros

2020-04-25 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94746

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #1 from Arseny Solokha  ---
I'm not a GCC developer, but this is by design.

https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wsystem-headers

[Bug ipa/94762] New: ICE: Segmentation fault (in is_tm_irrevocable)

2020-04-25 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94762

Bug ID: 94762
   Summary: ICE: Segmentation fault (in is_tm_irrevocable)
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-on-invalid-code, trans-mem
  Severity: normal
  Priority: P3
 Component: ipa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
CC: marxin at gcc dot gnu.org
  Target Milestone: ---
Target: x86_64-unknown-linux-gnu

gcc-10.0.1-alpha20200419 snapshot (g:717e91dbc44c6bf55a498f45f6045191ceb10a11),
gcc 9.3, gcc 8.3, gcc 7.3 all ICE when compiling the following testcase,
reduced from
test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
from the libcxx 10.0.0 test suite, w/ -O1 -fgnu-tm:

_Bool __attribute__ ((transaction_safe))
g5 (int fh, int gf)
{
  return __atomic_compare_exchange_n (, , 0, 0, 0, 0);
}

% x86_64-unknown-linux-gnu-gcc-10.0.1 -O1 -fgnu-tm -c gl8a6jtn.c
during IPA pass: tmipa
gl8a6jtn.c: In function 'g5':
gl8a6jtn.c:5:1: internal compiler error: Segmentation fault
5 | }
  | ^
0xd9466f crash_signal
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/toplev.c:328
0xd9a5e0 is_tm_irrevocable
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/trans-mem.c:234
0xd9c20f ipa_tm_scan_irr_block
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/trans-mem.c:4377
0xd9c20f ipa_tm_scan_irr_blocks
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/trans-mem.c:4449
0xd9c9b5 ipa_tm_scan_irr_function
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/trans-mem.c:4611
0xd9ea1e ipa_tm_execute
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/trans-mem.c:5512
0xd9ea1e execute
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/trans-mem.c:5670

Citing Jakub's PR94106 comment 2: "Nobody really maintains the -fgnu-tm stuff
anymore".

I didn't test it but it looks like Marek's patch from PR68122 comment 8, even
if is not a right fix, works this ICE around.

[Bug c++/94733] New: [10 Regression] ICE: tree check: expected identifier_node, have tree_list in is_attribute_p, at attribs.h:155

2020-04-23 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94733

Bug ID: 94733
   Summary: [10 Regression] ICE: tree check: expected
identifier_node, have tree_list in is_attribute_p, at
attribs.h:155
   Product: gcc
   Version: 10.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-10.0.1-alpha20200419 snapshot (g:717e91dbc44c6bf55a498f45f6045191ceb10a11)
ICEs when compiling the following testcase w/ -fgnu-tm:

struct [[gnu::may_alias]] pe { };

% g++-10.0.1 -fgnu-tm -c eqtzx3iu.cpp
eqtzx3iu.cpp:1:27: internal compiler error: tree check: expected
identifier_node, have tree_list in is_attribute_p, at attribs.h:155
1 | struct [[gnu::may_alias]] pe { };
  |   ^~
0x7bcf2c tree_check_failed(tree_node const*, char const*, int, char const*,
...)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/tree.c:9727
0x6aa239 tree_check(tree_node const*, char const*, int, char const*, tree_code)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/tree.h:3543
0x6aa239 is_attribute_p
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/attribs.h:155
0x6abe5e tm_attr_to_mask(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/tree.h:3401
0xafbaef find_tm_attribute(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/c-family/c-attribs.c:3318
0x896740 set_method_tm_attributes
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/class.c:5092
0x896740 finish_struct_1(tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/class.c:7302
0x897b24 finish_struct(tree_node*, tree_node*)
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/class.c:7516
0x9975f3 cp_parser_class_specifier_1
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/parser.c:23878
0x99969b cp_parser_class_specifier
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/parser.c:24177
0x99969b cp_parser_type_specifier
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/parser.c:17708
0x99a7a5 cp_parser_decl_specifier_seq
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/parser.c:14356
0x99b244 cp_parser_simple_declaration
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/parser.c:13610
0x9c5a32 cp_parser_declaration
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/parser.c:13430
0x9c61cf cp_parser_translation_unit
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/parser.c:4731
0x9c61cf c_parse_file()
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/cp/parser.c:43972
0xadeaeb c_common_parse_file()
   
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200419/work/gcc-10-20200419/gcc/c-family/c-opts.c:1190

Citing Jakub's PR94106 comment 2: "Nobody really maintains the -fgnu-tm stuff
anymore".

[Bug c++/66519] [C++14] ICE when using decltype to detect callable return type during SFINAE

2020-04-16 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66519

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #4 from Arseny Solokha  ---
g++ 9.2 ICEs w/ reduced testcase, but g++ 9.3 and g++-10.0.1-alpha20200412
snapshot (g:87be4cecfc6e42390303be1ca92bc8bc587b0bd6) both compile it now.

[Bug c++/91538] ICE with generic lambda.

2020-04-16 Thread asolokha at gmx dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91538

Arseny Solokha  changed:

   What|Removed |Added

 CC||asolokha at gmx dot com

--- Comment #2 from Arseny Solokha  ---
g++-10.0.1-alpha20200412 snapshot (g:87be4cecfc6e42390303be1ca92bc8bc587b0bd6)
and g++ 9.3 both don't crash, rejecting it instead:

% g++-10.0.1 -c pr91538.C   
pr91538.C: In function 'void f()':
pr91538.C:3:8: error: no match for call to '(f()::) (int)'
3 | l(0);
  |^
pr91538.C:2:14: note: candidate: 'f()::
[with auto:1 = {}]'
2 | auto l = [](auto... args, decltype(args)...){};
  |  ^
pr91538.C:2:14: note:   candidate expects 0 arguments, 1 provided

as do clang++ 9 and 10:

% clang++-10 -c pr91538.C 
pr91538.C:3:5: error: no matching function for call to object of type '(lambda
at pr91538.C:2:14)'
l(0);
^
pr91538.C:2:14: note: candidate function [with args:auto = <>] not viable:
requires 0 arguments, but 1 was provided
auto l = [](auto... args, decltype(args)...){};
 ^
1 error generated.

So it looks like this PR is really ice-on-invalid-code for gcc 8?

  1   2   3   4   5   6   7   8   9   10   >