[Bug c++/107083] [modules] internal compiler error: in core_vals, at cp/module.cc:6127

2022-09-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107083

Alexander Lelyakin  changed:

   What|Removed |Added

 CC||alexander.lelyakin@googlema
   ||il.com

--- Comment #1 from Alexander Lelyakin  ---
Similar output while precompiling header  :

g++ --param=hash-table-verification-limit=1000 -std=c++20 -fmodules-ts -x
c++-system-header execution

/usr/local/include/c++/13.0.0/execution: internal compiler error: in core_vals,
at cp/module.cc:6234
0x77c95d trees_out::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6234
0xb386b4 trees_out::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7178
0xb386b4 trees_out::tree_value(tree_node*)
../../gcc/gcc/cp/module.cc:9043
0xb34411 trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9241
0xb35ac3 trees_out::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6142
0xb32f1a trees_out::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7178
0xb32f1a trees_out::decl_value(tree_node*, depset*)
../../gcc/gcc/cp/module.cc:7757
0xb3a7a2 depset::hash::find_dependencies(module_state*)
../../gcc/gcc/cp/module.cc:13315
0xb3af31 module_state::write_begin(elf_out*, cpp_reader*, module_state_config&,
unsigned int&)
../../gcc/gcc/cp/module.cc:17887
0xb3c324 finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:20221
0xac9a1b c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.cc:5112
0xcf3610 c_common_parse_file()
../../gcc/gcc/c-family/c-opts.cc:1273
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 13.0.0 20220929 (experimental)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/103769] [11 Regression] checking ICE in hashtab_chk_error with alias template and pack expansion after r11-7931

2022-03-29 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103769

--- Comment #12 from Alexander Lelyakin  ---
Great!

Just to recall: At the URL 

https://lelyakin.de/hashtab/

You can always find results of everyday testing 
how can last version of GCC compile standard c++ headers.

And sorry, it cannot compile all of them does not matter in which order.

[Bug c++/100131] [meta-bug] internal compiler error: in hashtab_chk_error, at hash-table.c:137

2021-04-17 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100131

Alexander Lelyakin  changed:

   What|Removed |Added

 CC||alexander.lelyakin@googlema
   ||il.com

--- Comment #1 from Alexander Lelyakin  ---
Here: 

http://lelyakin.de/hashtab/in%20hashtab_chk_error/

You can find much more examples of this error.

[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files

2021-04-17 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227

--- Comment #3 from Alexander Lelyakin  ---
During last two and a half weeks 
3 bugs was closed:
99283 - in assert_definition
99284 - in key_mergeable
99427 - non-constant condition for static assertion

99246 ICE in write_location was reopened under number 99915

And 3 added:
99948 - in add_mergeable_specialization 
99861 - in hashtab_chk_error
100129 - ICE free(): invalid pointer

There is a suspect that 99737,99479,99722,99948 are all somehow connected with
hashtab checking. At least some of examples change diagnostic with:
  --param=hash-table-verification-limit=1000

So here: 

 http://lelyakin.de/hashtab/

you can find results of slightly modified script that compiles system modules
with additional hashtab checking.

[Bug c++/100129] New: [modules] ICE free(): invalid pointer

2021-04-17 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100129

Bug ID: 100129
   Summary: [modules] ICE free(): invalid pointer
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header execution
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header limits
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header unordered_set
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header stack
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header condition_variable
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header future

free(): invalid pointer
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

g++ (GCC) 11.0.1 20210416 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99722] [modules] internal compiler error: segmentation fault

2021-04-17 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99722

--- Comment #1 from Alexander Lelyakin  ---
All so far found examples of such error message 
change its behavior if you add the parameter:
  --param=hash-table-verification-limit=1000

Most of them to the error message: ICE in hashtab_chk_error.

[Bug c++/99479] [modules] ICE Aborted signal terminated program cc1plus

2021-04-16 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99479

--- Comment #10 from Alexander Lelyakin  ---
However adding parameter:
 --param=hash-table-verification-limit=1000 
turns this error to PR99861 ICE in hashtab_chk_error

/usr/local/bin/g++ --param=hash-table-verification-limit=$N -std=c++20
-fmodules-ts -x c++-system-header condition_variable
/usr/local/bin/g++ --param=hash-table-verification-limit=$N -std=c++20
-fmodules-ts -x c++-system-header iosfwd
/usr/local/bin/g++ --param=hash-table-verification-limit=$N -std=c++20
-fmodules-ts -x c++-system-header future

In file included from /usr/local/include/c++/11.0.1/string:43,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/mutex:42,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:156:74: error: wrong number of
template arguments (1, should be 2)
  156 |   template >
  |
 ^
In file included from /usr/local/include/c++/11.0.1/array:40,
 from /usr/local/include/c++/11.0.1/tuple:39,
 from /usr/local/include/c++/11.0.1/mutex:38,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:451:11: note: provided for
‘template class std::istreambuf_iterator’
  451 | class istreambuf_iterator;
  |   ^~~
In file included from /usr/local/include/c++/11.0.1/string:43,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/mutex:42,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:158:75: error: wrong number of
template arguments (1, should be 2)
  158 |   template >
  |
  ^
In file included from /usr/local/include/c++/11.0.1/array:40,
 from /usr/local/include/c++/11.0.1/tuple:39,
 from /usr/local/include/c++/11.0.1/mutex:38,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:454:11: note: provided for
‘template class std::ostreambuf_iterator’
  454 | class ostreambuf_iterator;
  |   ^~~
In file included from /usr/local/include/c++/11.0.1/string:43,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/mutex:42,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:177:75: error: wrong number of
template arguments (1, should be 2)
  177 |   template >
  |
  ^
In file included from /usr/local/include/c++/11.0.1/array:40,
 from /usr/local/include/c++/11.0.1/tuple:39,
 from /usr/local/include/c++/11.0.1/mutex:38,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:451:11: note: provided for
‘template class std::istreambuf_iterator’
  451 | class istreambuf_iterator;
  |   ^~~
In file included from /usr/local/include/c++/11.0.1/string:43,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/mutex:42,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:179:75: error: wrong number of
template arguments (1, should be 2)
  179 |   template >
  |
  ^
In file included from /usr/local/include/c++/11.0.1/array:40,
 from /usr/local/include/c++/11.0.1/tuple:39,
 from /usr/local/include/c++/11.0.1/mutex:38,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:451:11: note: provided for
‘template class std::istreambuf_iterator’
  451 | class istreambuf_iterator;
  |   ^~~
In file included from /usr/local/include/c++/11.0.1/string:43,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/mutex:42,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:182:75: error: wrong number of
template arguments (1, should be 2)
  182 |   template >
  |

[Bug c++/99479] [modules] ICE Aborted signal terminated program cc1plus

2021-04-16 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99479

--- Comment #9 from Alexander Lelyakin  ---
Todays shortest sequence:

usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header iosfwd
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future

In file included from /usr/local/include/c++/11.0.1/string:43,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/mutex:42,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:156:74: error: wrong number of
template arguments (1, should be 2)
  156 |   template >
  |
 ^
In file included from /usr/local/include/c++/11.0.1/array:40,
 from /usr/local/include/c++/11.0.1/tuple:39,
 from /usr/local/include/c++/11.0.1/mutex:38,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:451:11: note: provided for
‘template class std::istreambuf_iterator’
  451 | class istreambuf_iterator;
  |   ^~~
In file included from /usr/local/include/c++/11.0.1/string:43,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/mutex:42,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:158:75: error: wrong number of
template arguments (1, should be 2)
  158 |   template >
  |
  ^
In file included from /usr/local/include/c++/11.0.1/array:40,
 from /usr/local/include/c++/11.0.1/tuple:39,
 from /usr/local/include/c++/11.0.1/mutex:38,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:454:11: note: provided for
‘template class std::ostreambuf_iterator’
  454 | class ostreambuf_iterator;
  |   ^~~
In file included from /usr/local/include/c++/11.0.1/string:43,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/mutex:42,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:177:75: error: wrong number of
template arguments (1, should be 2)
  177 |   template >
  |
  ^
In file included from /usr/local/include/c++/11.0.1/array:40,
 from /usr/local/include/c++/11.0.1/tuple:39,
 from /usr/local/include/c++/11.0.1/mutex:38,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:451:11: note: provided for
‘template class std::istreambuf_iterator’
  451 | class istreambuf_iterator;
  |   ^~~
In file included from /usr/local/include/c++/11.0.1/string:43,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/mutex:42,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:179:75: error: wrong number of
template arguments (1, should be 2)
  179 |   template >
  |
  ^
In file included from /usr/local/include/c++/11.0.1/array:40,
 from /usr/local/include/c++/11.0.1/tuple:39,
 from /usr/local/include/c++/11.0.1/mutex:38,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:451:11: note: provided for
‘template class std::istreambuf_iterator’
  451 | class istreambuf_iterator;
  |   ^~~
In file included from /usr/local/include/c++/11.0.1/string:43,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/mutex:42,
 from /usr/local/include/c++/11.0.1/future:38:
/usr/local/include/c++/11.0.1/bits/localefwd.h:182:75: error: wrong number of
template arguments (1, should be 2)
  182 |   template >
  |
  ^
In file included from /usr/local/include/c++/11.0.1/array:40,
 from /usr/local/include/c++/11.0.1/tuple:39,
 from 

[Bug c++/99948] [modules] ICE in add_mergeable_specialization

2021-04-16 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99948

--- Comment #1 from Alexander Lelyakin  ---
Adding parameter:
 --param=hash-table-verification-limit=1000 
turns this error to PR99861 ICE in hashtab_chk_error

[Bug c++/99861] [modules] ICE in hashtab_chk_error

2021-04-16 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99861

--- Comment #9 from Alexander Lelyakin  ---
The same happens with the ICE in add_mergeable_specialization, PR99948,
http://lelyakin.de/modules/in%20add_mergeable_specialization/016_7ae8737cc3d793d796faedfe5de5d89d42b966b5/

After adding parameter --param=hash-table-verification-limit=1000
the error was transformed to:

hash table checking failed: equal operator returns true for a pair of values
with a different hash value
In file included from /usr/local/include/c++/11.0.1/memory:68,
 from /usr/local/include/c++/11.0.1/regex:45:
/usr/local/include/c++/11.0.1/bits/stl_raw_storage_iter.h: In destructor
‘constexpr std::allocator<  >::~allocator() [with _Tp =
char32_t]’:
/usr/local/include/c++/11.0.1/bits/stl_raw_storage_iter.h:95:58: internal
compiler error: in hashtab_chk_error, at hash-table.c:137
   95 | std::_Construct(std::__addressof(*_M_iter),
std::move(__element));
  |  ^~~~
0x92f671 hashtab_chk_error()
../../gcc/gcc/hash-table.c:137
0xb3ec35 hash_table::verify(spec_entry*
const&, unsigned int)
../../gcc/gcc/hash-table.h:1033
0xb3f1be hash_table::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
../../gcc/gcc/hash-table.h:968
0xafbd2b match_mergeable_specialization(bool, spec_entry*)
../../gcc/gcc/cp/pt.c:30034
0xa74e18 trees_in::key_mergeable(int, merge_kind, tree_node*, tree_node*,
tree_node*, tree_node*, bool)
../../gcc/gcc/cp/module.cc:10670
0xa78a14 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7903
0xa71877 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9153
0xa77e9b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14811
0xa7839d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7845f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa726e0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa77b9b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa7839d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7845f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa726e0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa77b9b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa7839d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7845f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa7b5b7 lazy_load_pendings(tree_node*)
../../gcc/gcc/cp/module.cc:18833
0xa83d58 maybe_lazily_declare
../../gcc/gcc/cp/name-lookup.c:1912
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

However this parameter significantly slows compilation.

And already two weeks this report remains unassigned...

[Bug c++/99861] [modules] ICE in hashtab_chk_error

2021-04-16 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99861

--- Comment #8 from Alexander Lelyakin  ---
Interesting: There is a pair of system headers
  and  
Almost any sequence of system headers having condition_variable and ending at
future will produce Segmentation fault

With parameter --param=hash-table-verification-limit=1000
this pair produces hashtab_chk_error instead of Segmentation fault.

So probably for some or all or most of sequences producing "Segmentation fault"
the reason in somewhere in hashtab?

/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header condition_variable
/usr/local/bin/g++ --param=hash-table-verification-limit=1000 -std=c++20
-fmodules-ts -x c++-system-header future

hash table checking failed: equal operator returns true for a pair of values
with a different hash value
In file included from /usr/local/include/c++/11.0.1/future:43:
/usr/local/include/c++/11.0.1/bits/atomic_futex.h:77:5: internal compiler
error: in hashtab_chk_error, at hash-table.c:137
   77 | atomic _M_data;
  | ^~
0x92f671 hashtab_chk_error()
../../gcc/gcc/hash-table.c:137
0xb3ec35 hash_table::verify(spec_entry*
const&, unsigned int)
../../gcc/gcc/hash-table.h:1033
0xb3f1be hash_table::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
../../gcc/gcc/hash-table.h:968
0xafbd2b match_mergeable_specialization(bool, spec_entry*)
../../gcc/gcc/cp/pt.c:30034
0xa74e18 trees_in::key_mergeable(int, merge_kind, tree_node*, tree_node*,
tree_node*, tree_node*, bool)
../../gcc/gcc/cp/module.cc:10670
0xa78a14 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7903
0xa71877 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9153
0xa77e9b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14811
0xa7839d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7845f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa726e0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa77b9b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa7839d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7845f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa726e0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa77b9b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa7839d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa78558 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*)
../../gcc/gcc/cp/module.cc:18773
0xa8a17e name_lookup::search_namespace_only(tree_node*)
../../gcc/gcc/cp/name-lookup.c:928
0xa8b7cb name_lookup::search_unqualified(tree_node*, cp_binding_level*)
../../gcc/gcc/cp/name-lookup.c:1158
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

At commit: 784de5292c34e287c848b382b431599b818ea76e

[Bug c++/99861] [modules] ICE in hashtab_chk_error

2021-04-16 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99861

--- Comment #6 from Alexander Lelyakin  ---
And where this parameter should be specified?
At configure?

Here the compiler was built with almost default parameters:
 configure --enable-languages=c++ --disable-multilib

Anyway at every commit it is possible to find sequences producing this error.

[Bug c++/99861] [modules] ICE in hashtab_chk_error

2021-04-15 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99861

--- Comment #4 from Alexander Lelyakin  ---
After every few commits one sequence stops to reproduce this error, but some
another appears.

See current status here: http://lelyakin.de/modules/in%20hashtab_chk_error/

Today shortest sequence is:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cerrno
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_map
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstring
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header algorithm

hash table checking failed: equal operator returns true for a pair of values
with a different hash value
In file included from /usr/local/include/c++/11.0.1/vector:66,
 from /usr/local/include/c++/11.0.1/functional:62,
 from
/usr/local/include/c++/11.0.1/pstl/glue_algorithm_defs.h:13,
 from /usr/local/include/c++/11.0.1/algorithm:74:
/usr/local/include/c++/11.0.1/bits/stl_uninitialized.h: In static member
function ‘static _ForwardIterator
std::__uninitialized_copy::__uninit_copy(_InputIterator, _InputIterator,
_ForwardIterator)’:
/usr/local/include/c++/11.0.1/bits/stl_uninitialized.h:110:23: internal
compiler error: in hashtab_chk_error, at hash-table.c:137
  110 | { return std::copy(__first, __last, __result); }
  |   ^~~~
0x92f4b5 hashtab_chk_error()
../../gcc/gcc/hash-table.c:137
0xb3e835 hash_table::verify(spec_entry*
const&, unsigned int)
../../gcc/gcc/hash-table.h:1033
0xb3edbe hash_table::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
../../gcc/gcc/hash-table.h:968
0xafba1b match_mergeable_specialization(bool, spec_entry*)
../../gcc/gcc/cp/pt.c:3
0xa74b08 trees_in::key_mergeable(int, merge_kind, tree_node*, tree_node*,
tree_node*, tree_node*, bool)
../../gcc/gcc/cp/module.cc:10670
0xa78704 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7903
0xa71567 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9153
0xa77b8b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14811
0xa7808d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7814f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa723d0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa7788b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa7808d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7814f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa723d0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa7788b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa7808d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7814f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa723d0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa7788b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210415 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99915] [modules] ICE in write_location

2021-04-09 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99915

--- Comment #1 from Alexander Lelyakin  ---
Another sequence, same length:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header coroutine
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cerrno
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdlib
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header csetjmp
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bitset
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory_resource
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ios
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdbool
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In module imported at /usr/local/include/c++/11.0.1/istream:38:1,
included from /usr/local/include/c++/11.0.1/sstream:38,
 from /usr/local/include/c++/11.0.1/regex:46:
/usr/local/include/c++/11.0.1/ios: note: unable to represent further imported
source locations
/usr/local/include/c++/11.0.1/regex: internal compiler error: in
write_location, at cp/module.cc:15607
0x6df3ed module_state::write_location(bytes_out&, unsigned int)
../../gcc/gcc/cp/module.cc:15607
0xa68c23 trees_out::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:5904
0xa6c094 trees_out::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7054
0xa6c094 trees_out::tree_value(tree_node*)
../../gcc/gcc/cp/module.cc:8890
0xa68124 trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9088
0xa6c47a trees_out::write_var_def(tree_node*)
../../gcc/gcc/cp/module.cc:11475
0xa6d715 module_state::write_cluster(elf_out*, depset**, unsigned int,
depset::hash&, unsigned int*, unsigned int*)
../../gcc/gcc/cp/module.cc:14662
0xa6f09e module_state::write(elf_out*, cpp_reader*)
../../gcc/gcc/cp/module.cc:17734
0xa6fe08 finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:19857
0xa02fab c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210409 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99861] [modules] ICE in hashtab_chk_error

2021-04-09 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99861

--- Comment #3 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header map
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header clocale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

hash table checking failed: equal operator returns true for a pair of values
with a different hash value
In file included from /usr/local/include/c++/11.0.1/bits/unique_ptr.h:42,
 from /usr/local/include/c++/11.0.1/bits/locale_conv.h:41,
 from /usr/local/include/c++/11.0.1/locale:43,
 from /usr/local/include/c++/11.0.1/regex:44:
/usr/local/include/c++/11.0.1/ostream: In substitution of ‘template typename
std::enable_if >,
std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable::__ostream_type, const _Tp&, void>
>::value, typename
std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type
std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = int; _Tp =
std::regex_constants::__syntax_option]’:
/usr/local/include/c++/11.0.1/bits/regex_constants.h:88:42:   required from
here
/usr/local/include/c++/11.0.1/ostream:773:5: internal compiler error: in
hashtab_chk_error, at hash-table.c:137
  773 | operator<<(_Ostream&& __os, const _Tp& __x)
  | ^~~~
0x92f047 hashtab_chk_error()
../../gcc/gcc/hash-table.c:137
0xb3ddf5 hash_table::verify(spec_entry*
const&, unsigned int)
../../gcc/gcc/hash-table.h:1033
0xb3e37e hash_table::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
../../gcc/gcc/hash-table.h:968
0xafb10b match_mergeable_specialization(bool, spec_entry*)
../../gcc/gcc/cp/pt.c:29961
0xa74528 trees_in::key_mergeable(int, merge_kind, tree_node*, tree_node*,
tree_node*, tree_node*, bool)
../../gcc/gcc/cp/module.cc:10670
0xa78124 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7903
0xa70f87 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9153
0xa70ef9 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9203
0xa7182d trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9346
0xa72987 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6537
0xa781f9 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7061
0xa781f9 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7942
0xa70f87 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9153
0xa775ab module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14811
0xa77aad module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa77b6f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa71df0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa772ab module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa77aad module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa77b6f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210409 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99241] [modules] ICE in install_entity, at cp/module.cc:7584

2021-04-08 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99241

--- Comment #4 from Alexander Lelyakin  ---
The ICE in "install entity" can have different stacktrace. 
Stacktrace is same up to 'module_state::load_section'
but then it has at least two different variants:

1
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In file included from /usr/local/include/c++/11.0.1/sstream:38,
 from /usr/local/include/c++/11.0.1/regex:46:
/usr/local/include/c++/11.0.1/istream:58:42: internal compiler error: in
install_entity, at cp/module.cc:7468
   58 | class basic_istream : virtual public basic_ios<_CharT, _Traits>
  |  ^
0xa6f888 trees_in::install_entity(tree_node*)
../../gcc/gcc/cp/module.cc:7468
0xa77da6 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7980
0xa70767 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9153
0xa76d8b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14811
0xa7728d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7734f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa715d0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa76a8b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa7728d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa77448 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*)
../../gcc/gcc/cp/module.cc:18773
0xa8906e name_lookup::search_namespace_only(tree_node*)
../../gcc/gcc/cp/name-lookup.c:928
0xa8a6bb name_lookup::search_unqualified(tree_node*, cp_binding_level*)
../../gcc/gcc/cp/name-lookup.c:1158
0xa8d3c4 lookup_name_1
../../gcc/gcc/cp/name-lookup.c:7804
0xa8d5aa lookup_name(tree_node*, LOOK_where, LOOK_want)
../../gcc/gcc/cp/name-lookup.c:7824
0xa9c282 lookup_name(tree_node*, LOOK_want)
../../gcc/gcc/cp/name-lookup.h:401
0xa9c282 cp_parser_lookup_name
../../gcc/gcc/cp/parser.c:29386
0xac4eef cp_parser_template_name
../../gcc/gcc/cp/parser.c:17711
0xac5432 cp_parser_template_id
../../gcc/gcc/cp/parser.c:17326
0xac5d4b cp_parser_class_name
../../gcc/gcc/cp/parser.c:24703
0xabd1fa cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:7002
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

and compare:

2
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header array
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header valarray

In file included from /usr/local/include/c++/11.0.1/bits/hashtable.h:35,
 from /usr/local/include/c++/11.0.1/unordered_map:46,
 from /usr/local/include/c++/11.0.1/functional:61,
 from
/usr/local/include/c++/11.0.1/pstl/glue_algorithm_defs.h:13,
 from /usr/local/include/c++/11.0.1/algorithm:74,
 from /usr/local/include/c++/11.0.1/valarray:38:
/usr/local/include/c++/11.0.1/bits/hashtable_policy.h:63:51: internal compiler
error: in install_entity, at cp/module.cc:7468
   63 | inline typename std::iterator_traits<_Iterator>::difference_type
  |   ^
0xa6f888 trees_in::install_entity(tree_node*)
../../gcc/gcc/cp/module.cc:7468
0xa77da6 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7980
0xa70767 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9153
0xa76d8b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14811
0xa7728d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7734f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa715d0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa76a8b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa7728d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7734f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa715d0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa76a8b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa7728d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7734f module_state::lazy_load(unsigned int, binding_slot*)

[Bug c++/99879] [modules] ICE in open

2021-04-08 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99879

--- Comment #2 from Alexander Lelyakin  ---
The last sequence sometimes gives ICE in open, and sometimes in install entity:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdio
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header span
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdint
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header clocale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bitset
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header semaphore
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header exception
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header numbers
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header charconv
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ranges
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstring
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In module imported at /usr/local/include/c++/11.0.1/regex:45:1:
/usr/local/include/c++/11.0.1/memory: note: unable to represent further
imported source locations
In file included from /usr/local/include/c++/11.0.1/sstream:38,
 from /usr/local/include/c++/11.0.1/regex:46:
/usr/local/include/c++/11.0.1/istream:58:42: internal compiler error: in
install_entity, at cp/module.cc:7468
   58 | class basic_istream : virtual public basic_ios<_CharT, _Traits>
  |  ^
0xa700a8 trees_in::install_entity(tree_node*)
../../gcc/gcc/cp/module.cc:7468
0xa785c6 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7980
0xa70f87 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9153
0xa775ab module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14811
0xa77aad module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa77b6f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa71df0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa772ab module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa77aad module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa77b6f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa71df0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa772ab module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa77aad module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa77c68 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*)
../../gcc/gcc/cp/module.cc:18773
0xa8988e name_lookup::search_namespace_only(tree_node*)
../../gcc/gcc/cp/name-lookup.c:928
0xa8aedb name_lookup::search_unqualified(tree_node*, cp_binding_level*)
../../gcc/gcc/cp/name-lookup.c:1158
0xa8dbe4 lookup_name_1
../../gcc/gcc/cp/name-lookup.c:7804
0xa8ddca lookup_name(tree_node*, LOOK_where, LOOK_want)
../../gcc/gcc/cp/name-lookup.c:7824
0xa9caa2 lookup_name(tree_node*, LOOK_want)
../../gcc/gcc/cp/name-lookup.h:401
0xa9caa2 cp_parser_lookup_name
../../gcc/gcc/cp/parser.c:29386
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c++/99879] [modules] ICE in open

2021-04-08 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99879

--- Comment #1 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdio
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header span
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdint
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header clocale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bitset
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header semaphore
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header exception
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header numbers
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header charconv
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ranges
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstring
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In module imported at /usr/local/include/c++/11.0.1/regex:53:
/usr/local/include/c++/11.0.1/cstring: note: unable to represent further
imported source locations
/usr/local/include/c++/11.0.1/regex:53: internal compiler error: in open, at
cp/module.cc:13628
   53 | #include 
  | 
0x6df11d loc_spans::open(unsigned int)
../../gcc/gcc/cp/module.cc:13628
0xa62db5 preprocess_module(module_state*, unsigned int, bool, bool, bool,
cpp_reader*)
../../gcc/gcc/cp/module.cc:19432
0xa2ccef module_token_filter::resume(int, int, tree_node*, unsigned int)
../../gcc/gcc/cp/lex.c:520
0xa2ccef module_token_lang(int, int, tree_node*, unsigned int, unsigned long)
../../gcc/gcc/cp/lex.c:557
0xae0d53 cp_lexer_new_main
../../gcc/gcc/cp/parser.c:660
0xae0d53 c_parse_file()
../../gcc/gcc/cp/parser.c:45264
0xc05d0d c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1218
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210408 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files

2021-04-07 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227
Bug 99227 depends on bug 99855, which changed state.

Bug 99855 Summary: [modules] ICE Error reporting routines re-entered.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99855

   What|Removed |Added

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

[Bug c++/99855] [modules] ICE Error reporting routines re-entered.

2021-04-07 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99855

Alexander Lelyakin  changed:

   What|Removed |Added

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

--- Comment #7 from Alexander Lelyakin  ---
Not reproduced anymore during last week.

[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files

2021-04-07 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227
Bug 99227 depends on bug 99747, which changed state.

Bug 99747 Summary: [modules] ICE in make_dependency, at cp/module.cc:12396
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99747

   What|Removed |Added

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

[Bug c++/99747] [modules] ICE in make_dependency, at cp/module.cc:12396

2021-04-07 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99747

Alexander Lelyakin  changed:

   What|Removed |Added

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

--- Comment #2 from Alexander Lelyakin  ---
Not seen anymore

[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files

2021-04-07 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227
Bug 99227 depends on bug 99735, which changed state.

Bug 99735 Summary: [modules] in system headers: non-template type 
‘rebind_alloc’ used as a template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99735

   What|Removed |Added

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

[Bug c++/99735] [modules] in system headers: non-template type ‘rebind_alloc’ used as a template

2021-04-07 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99735

Alexander Lelyakin  changed:

   What|Removed |Added

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

--- Comment #4 from Alexander Lelyakin  ---
This error message is not seen anymore.

[Bug c++/99948] New: [modules] ICE in add_mergeable_specialization

2021-04-06 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99948

Bug ID: 99948
   Summary: [modules] ICE in add_mergeable_specialization
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header sstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cwctype
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header iostream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cmath
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdlib
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cwchar
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header utility
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header execution

In file included from /usr/local/include/c++/11.0.1/numeric:62,
 from
/usr/local/include/c++/11.0.1/pstl/parallel_backend_serial.h:16,
 from /usr/local/include/c++/11.0.1/pstl/parallel_backend.h:14,
 from /usr/local/include/c++/11.0.1/pstl/algorithm_impl.h:22,
 from
/usr/local/include/c++/11.0.1/pstl/glue_execution_defs.h:50,
 from /usr/local/include/c++/11.0.1/execution:32:
/usr/local/include/c++/11.0.1/bits/stl_numeric.h: In function ‘constexpr void
std::iota(_ForwardIterator, _ForwardIterator, _Tp)’:
/usr/local/include/c++/11.0.1/bits/stl_numeric.h:97:25: internal compiler
error: in add_mergeable_specialization, at cp/pt.c:30015
   97 |   for (; __first != __last; ++__first)
  | ^~
0x707243 add_mergeable_specialization(bool, bool, spec_entry*, tree_node*,
unsigned int)
../../gcc/gcc/cp/pt.c:30015
0xa770ff trees_in::decl_value()
../../gcc/gcc/cp/module.cc:8071
0xa6f617 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9153
0xa75c3b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14811
0xa7613d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa762f8 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*)
../../gcc/gcc/cp/module.cc:18773
0xa87f2e name_lookup::search_namespace_only(tree_node*)
../../gcc/gcc/cp/name-lookup.c:928
0xa8957b name_lookup::search_unqualified(tree_node*, cp_binding_level*)
../../gcc/gcc/cp/name-lookup.c:1158
0xa8c284 lookup_name_1
../../gcc/gcc/cp/name-lookup.c:7804
0xa8c5fb lookup_name(tree_node*, LOOK_where, LOOK_want)
../../gcc/gcc/cp/name-lookup.c:7824
0xa8c5fb lookup_name(tree_node*)
../../gcc/gcc/cp/name-lookup.c:7832
0xa8c5fb op_unqualified_lookup
../../gcc/gcc/cp/name-lookup.c:9086
0xa8c5fb maybe_save_operator_binding(tree_node*)
../../gcc/gcc/cp/name-lookup.c:9148
0xb85b36 build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node**, int)
../../gcc/gcc/cp/typeck.c:4302
0xaa3b95 cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:10005
0xaa430c cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:10143
0xaa5852 cp_parser_expression
../../gcc/gcc/cp/parser.c:10313
0xacbe7a cp_parser_condition
../../gcc/gcc/cp/parser.c:12665
0xad6c3b cp_parser_c_for
../../gcc/gcc/cp/parser.c:12706
0xad6c3b cp_parser_for
../../gcc/gcc/cp/parser.c:12687
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210406 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99861] [modules] ICE in hashtab_chk_error

2021-04-05 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99861

--- Comment #2 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_map
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header algorithm

hash table checking failed: equal operator returns true for a pair of values
with a different hash value
In file included from /usr/local/include/c++/11.0.1/vector:66,
 from /usr/local/include/c++/11.0.1/functional:62,
 from
/usr/local/include/c++/11.0.1/pstl/glue_algorithm_defs.h:13,
 from /usr/local/include/c++/11.0.1/algorithm:74:
/usr/local/include/c++/11.0.1/bits/stl_uninitialized.h: In static member
function ‘static _ForwardIterator
std::__uninitialized_copy::__uninit_copy(_InputIterator, _InputIterator,
_ForwardIterator)’:
/usr/local/include/c++/11.0.1/bits/stl_uninitialized.h:110:23: internal
compiler error: in hashtab_chk_error, at hash-table.c:137
  110 | { return std::copy(__first, __last, __result); }
  |   ^~~~
0x92db09 hashtab_chk_error()
../../gcc/gcc/hash-table.c:137
0xb3c135 hash_table::verify(spec_entry*
const&, unsigned int)
../../gcc/gcc/hash-table.h:1033
0xb3c6be hash_table::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
../../gcc/gcc/hash-table.h:968
0xaf957b match_mergeable_specialization(bool, spec_entry*)
../../gcc/gcc/cp/pt.c:29908
0xa72a58 trees_in::key_mergeable(int, merge_kind, tree_node*, tree_node*,
tree_node*, tree_node*, bool)
../../gcc/gcc/cp/module.cc:10670
0xa76654 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7903
0xa6f4b7 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9153
0xa75adb module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14811
0xa75fdd module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7609f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa70320 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa757db module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa75fdd module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7609f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa70320 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa757db module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
0xa75fdd module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18082
0xa7609f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18740
0xa70320 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9664
0xa757db module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14717
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210405 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99915] New: [modules] ICE in write_location

2021-04-05 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99915

Bug ID: 99915
   Summary: [modules] ICE in write_location
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

This ICE is very similar to 99246, but it is closed as fixed.
So I assume that it is a new bug with similar symptoms.

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bit
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header istream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cmath
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bitset
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header new
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ciso646
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header thread
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In module imported at /usr/local/include/c++/11.0.1/sstream:38:1,
included from /usr/local/include/c++/11.0.1/regex:46:
/usr/local/include/c++/11.0.1/istream: note: unable to represent further
imported source locations
/usr/local/include/c++/11.0.1/regex: internal compiler error: in
write_location, at cp/module.cc:15607
0x6de279 module_state::write_location(bytes_out&, unsigned int)
../../gcc/gcc/cp/module.cc:15607
0xa67153 trees_out::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:5904
0xa6a5c4 trees_out::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7054
0xa6a5c4 trees_out::tree_value(tree_node*)
../../gcc/gcc/cp/module.cc:8890
0xa66654 trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9088
0xa6a9aa trees_out::write_var_def(tree_node*)
../../gcc/gcc/cp/module.cc:11475
0xa6bc45 module_state::write_cluster(elf_out*, depset**, unsigned int,
depset::hash&, unsigned int*, unsigned int*)
../../gcc/gcc/cp/module.cc:14662
0xa6d5ce module_state::write(elf_out*, cpp_reader*)
../../gcc/gcc/cp/module.cc:17734
0xa6e338 finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:19845
0xa014cb c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210405 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608

2021-04-02 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283

--- Comment #24 from Alexander Lelyakin  ---
Congratulations! 
After first testing results this bug is not seen more!

[Bug c++/99879] New: [modules] ICE in open

2021-04-01 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99879

Bug ID: 99879
   Summary: [modules] ICE in open
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header climits
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cmath
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header source_location
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header set
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bit
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header functional
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header queue
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header iomanip
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header syncstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_set
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header forward_list
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header semaphore
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstring
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header istream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header iostream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header thread
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header typeinfo
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header latch
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ratio
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cerrno
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ios
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header csignal
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In module imported at /usr/local/include/c++/11.0.1/regex:53:
/usr/local/include/c++/11.0.1/cstring: note: unable to represent further
imported source locations
/usr/local/include/c++/11.0.1/regex:53: internal compiler error: in open, at
cp/module.cc:13625
   53 | #include 
  | 
0x6de0f9 loc_spans::open(unsigned int)
../../gcc/gcc/cp/module.cc:13625
0xa61915 preprocess_module(module_state*, unsigned int, bool, bool, bool,
cpp_reader*)
../../gcc/gcc/cp/module.cc:19417
0xa2b82f module_token_filter::resume(int, int, tree_node*, unsigned int)
../../gcc/gcc/cp/lex.c:520
0xa2b82f module_token_lang(int, int, tree_node*, unsigned int, unsigned long)
../../gcc/gcc/cp/lex.c:557
0xadf873 cp_lexer_new_main
../../gcc/gcc/cp/parser.c:660
0xadf873 c_parse_file()
../../gcc/gcc/cp/parser.c:45253
0xc0480d c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1218
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210401 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608

2021-04-01 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283

--- Comment #22 from Alexander Lelyakin  ---
Clean rebuild do not change things:

/home/sasha/GCC/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
/home/sasha/GCC/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
type_traits
/home/sasha/GCC/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header valarray

In file included from /home/sasha/GCC/include/c++/11.0.1/iterator:66,
 from
/home/sasha/GCC/include/c++/11.0.1/bits/ranges_algobase.h:36,
 from /home/sasha/GCC/include/c++/11.0.1/bits/ranges_algo.h:35,
 from /home/sasha/GCC/include/c++/11.0.1/algorithm:64,
 from /home/sasha/GCC/include/c++/11.0.1/valarray:38:
/home/sasha/GCC/include/c++/11.0.1/bits/streambuf_iterator.h:53:5: internal
compiler error: in assert_definition, at cp/module.cc:4492
   53 | {
  | ^
0x6e31c7 trees_in::assert_definition(tree_node*, bool)
../../gcc/gcc/cp/module.cc:4492
0xa5eed0 trees_in::odr_duplicate(tree_node*, bool)
../../gcc/gcc/cp/module.cc:11323
0xa6e5af trees_in::read_function_def(tree_node*, tree_node*)
../../gcc/gcc/cp/module.cc:11403
0xa70aa1 module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14817
0xa7111d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18079
0xa711df module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18737
0xa6b460 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9661
0xa7091b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14714
0xa7111d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18079
0xa711df module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18737
0xa74337 lazy_load_pendings(tree_node*)
../../gcc/gcc/cp/module.cc:18830
0xb7eed5 complete_type(tree_node*)
../../gcc/gcc/cp/typeck.c:140
0xb3fe22 lookup_member(tree_node*, tree_node*, int, bool, int,
access_failure_info*)
../../gcc/gcc/cp/search.c:1148
0xa79195 get_class_binding
../../gcc/gcc/cp/name-lookup.c:5333
0xa8065f outer_binding(tree_node*, cxx_binding*, bool)
../../gcc/gcc/cp/name-lookup.c:7649
0xa808af innermost_non_namespace_value(tree_node*)
../../gcc/gcc/cp/name-lookup.c:7686
0xae6547 check_template_shadow(tree_node*)
../../gcc/gcc/cp/pt.c:4379
0xa7ced1 push_class_level_binding_1
../../gcc/gcc/cp/name-lookup.c:5418
0xa7d49e push_class_level_binding(tree_node*, tree_node*)
../../gcc/gcc/cp/name-lookup.c:5567
0xa7d49e pushdecl_class_level(tree_node*)
../../gcc/gcc/cp/name-lookup.c:5280
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210323 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608

2021-04-01 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283

--- Comment #20 from Alexander Lelyakin  ---
Just make:
 git pull
 make
 make install

That is: just make in previously configured dir.

Then:
---
g++ -std=c++20 -fmodules-ts -x c++-system-header string
g++ -std=c++20 -fmodules-ts -x c++-system-header type_traits
g++ -std=c++20 -fmodules-ts -x c++-system-header iostream

In file included from /home/sasha/GCC/include/c++/11.0.1/bits/ios_base.h:41,
 from /home/sasha/GCC/include/c++/11.0.1/ios:42,
 from /home/sasha/GCC/include/c++/11.0.1/ostream:38,
 from /home/sasha/GCC/include/c++/11.0.1/iostream:39:
/home/sasha/GCC/include/c++/11.0.1/bits/locale_classes.h:163:23: internal
compiler error: in assert_definition, at cp/module.cc:4492
  163 | locale(const std::string& __s) : locale(__s.c_str()) { }
  |   ^~
0x6e31c7 trees_in::assert_definition(tree_node*, bool)
../../gcc/gcc/cp/module.cc:4492
0xa5eed0 trees_in::odr_duplicate(tree_node*, bool)
../../gcc/gcc/cp/module.cc:11323
0xa6e5af trees_in::read_function_def(tree_node*, tree_node*)
../../gcc/gcc/cp/module.cc:11403
0xa70aa1 module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14817
0xa7111d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18079
0xa711df module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18737
0xa6b460 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9661
0xa7091b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14714
0xa7111d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18079
0xa711df module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18737
0xa6b460 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9661
0xa7091b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14714
0xa7111d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18079
0xa712d8 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*)
../../gcc/gcc/cp/module.cc:18770
0xa8301e name_lookup::search_namespace_only(tree_node*)
../../gcc/gcc/cp/name-lookup.c:928
0xa8321a name_lookup::search_namespace(tree_node*)
../../gcc/gcc/cp/name-lookup.c:1014
0xa8321a name_lookup::search_namespace(tree_node*)
../../gcc/gcc/cp/name-lookup.c:1007
0xa8331c name_lookup::search_qualified(tree_node*, bool)
../../gcc/gcc/cp/name-lookup.c:1075
0xa8785f qualified_namespace_lookup
../../gcc/gcc/cp/name-lookup.c:7161
0xa88878 lookup_qualified_name(tree_node*, tree_node*, LOOK_want, bool)
../../gcc/gcc/cp/name-lookup.c:7122
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210323 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---

Will do full rebuild in clean directory to make test cleaner.

[Bug c++/99855] [modules] ICE Error reporting routines re-entered.

2021-04-01 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99855

--- Comment #6 from Alexander Lelyakin  ---
Today this message was not seen.

[Bug c++/99737] [modules] malloc(): smallbin double linked list corrupted

2021-03-31 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99737

--- Comment #4 from Alexander Lelyakin  ---
Today's sequence is:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header tuple
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header set
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cmath
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

Repeatedly running this sequence i have found that it produces little different
error messages every time. 
1
corrupted double-linked list
In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:1851:34: internal compiler
error: Aborted
 1851 | : public __hash_base>
  |  ^
0x110a6ff crash_signal
../../gcc/gcc/toplev.c:327
0x1d549f4 xcalloc
../../gcc/libiberty/xmalloc.c:162
0xae35f6 xcallocator::data_alloc(unsigned long)
../../gcc/gcc/hash-table.h:275
0xae35f6 hash_table, false,
xcallocator>::alloc_entries(unsigned long) const
../../gcc/gcc/hash-table.h:711
0xae35f6 hash_table, false,
xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_origin)
../../gcc/gcc/hash-table.h:628
0xae3d50 hash_set
>::hash_set(unsigned long, bool)
../../gcc/gcc/hash-set.h:41
0xae3d50 for_each_template_parm
../../gcc/gcc/cp/pt.c:10564
0xac06cc cp_parser_type_id_1
../../gcc/gcc/cp/parser.c:23221
0xac2be3 cp_parser_template_type_arg
../../gcc/gcc/cp/parser.c:23275
0xac2d0f cp_parser_template_argument
../../gcc/gcc/cp/parser.c:17915
0xac2d0f cp_parser_template_argument_list
../../gcc/gcc/cp/parser.c:17826
0xac2d0f cp_parser_enclosed_template_argument_list
../../gcc/gcc/cp/parser.c:30799
0xac4066 cp_parser_template_id
../../gcc/gcc/cp/parser.c:17398
0xac47fb cp_parser_class_name
../../gcc/gcc/cp/parser.c:24692
0xabbcaa cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:7002
0xabbcaa cp_parser_nested_name_specifier_opt
../../gcc/gcc/cp/parser.c:6684
0xaaf80c cp_parser_base_specifier
../../gcc/gcc/cp/parser.c:26711
0xaaf80c cp_parser_base_clause
../../gcc/gcc/cp/parser.c:26564
0xaaf80c cp_parser_class_head
../../gcc/gcc/cp/parser.c:25651
0xaaf80c cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:24814
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

2
corrupted double-linked list
In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:1851:52: internal compiler
error: Aborted
 1851 | : public __hash_base>
  |^~~
0x110a6ff crash_signal
../../gcc/gcc/toplev.c:327
0x1d549f4 xcalloc
../../gcc/libiberty/xmalloc.c:162
0x13f3fd9 xcallocator::data_alloc(unsigned long)
../../gcc/gcc/hash-table.h:275
0x13f3fd9 hash_table, false,
xcallocator>::alloc_entries(unsigned long) const
../../gcc/gcc/hash-table.h:711
0x13f3fd9 hash_table, false,
xcallocator>::hash_table(unsigned long, bool, bool, bool, mem_alloc_origin)
../../gcc/gcc/hash-table.h:628
0x13f3fd9 hash_set
>::hash_set(unsigned long, bool)
../../gcc/gcc/hash-set.h:41
0x13f3fd9 walk_tree_without_duplicates_1(tree_node**, tree_node*
(*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*,
tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*))
../../gcc/gcc/tree.c:12474
0xaf4b99 instantiation_dependent_uneval_expression_p(tree_node*)
../../gcc/gcc/cp/pt.c:27494
0xaf4b99 instantiation_dependent_expression_p(tree_node*)
../../gcc/gcc/cp/pt.c:27504
0x982285 is_nondependent_constant_expression(tree_node*)
../../gcc/gcc/cp/constexpr.c:8960
0x982285 is_nondependent_constant_expression(tree_node*)
../../gcc/gcc/cp/constexpr.c:8956
0x98308f maybe_constant_value(tree_node*, tree_node*, bool)
../../gcc/gcc/cp/constexpr.c:7432
0xb23c0c convert_nontype_argument
../../gcc/gcc/cp/pt.c:7274
0xb23c0c convert_template_argument
../../gcc/gcc/cp/pt.c:8508
0xb259c3 coerce_template_parms
../../gcc/gcc/cp/pt.c:8987
0xb286d9 lookup_template_class_1
../../gcc/gcc/cp/pt.c:9825
0xb2a47c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc/gcc/cp/pt.c:10211
0xb5285b finish_template_type(tree_node*, tree_node*, 

[Bug c++/99861] New: [modules] ICE in hashtab_chk_error

2021-03-31 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99861

Bug ID: 99861
   Summary: [modules] ICE in hashtab_chk_error
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header latch
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cfenv
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header clocale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cmath
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ciso646
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_map
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header algorithm

hash table checking failed: equal operator returns true for a pair of values
with a different hash value
In file included from /usr/local/include/c++/11.0.1/vector:66,
 from /usr/local/include/c++/11.0.1/functional:62,
 from
/usr/local/include/c++/11.0.1/pstl/glue_algorithm_defs.h:13,
 from /usr/local/include/c++/11.0.1/algorithm:74:
/usr/local/include/c++/11.0.1/bits/stl_uninitialized.h: In static member
function ‘static _ForwardIterator
std::__uninitialized_copy::__uninit_copy(_InputIterator, _InputIterator,
_ForwardIterator)’:
/usr/local/include/c++/11.0.1/bits/stl_uninitialized.h:110:23: internal
compiler error: in hashtab_chk_error, at hash-table.c:137
  110 | { return std::copy(__first, __last, __result); }
  |   ^~~~
0x92894b hashtab_chk_error()
../../gcc/gcc/hash-table.c:137
0xb35fa5 hash_table::verify(spec_entry*
const&, unsigned int)
../../gcc/gcc/hash-table.h:1033
0xb3652e hash_table::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
../../gcc/gcc/hash-table.h:968
0xaf315b match_mergeable_specialization(bool, spec_entry*)
../../gcc/gcc/cp/pt.c:29942
0xa6cf43 trees_in::key_mergeable(int, merge_kind, tree_node*, tree_node*,
tree_node*, tree_node*, bool)
../../gcc/gcc/cp/module.cc:10667
0xa70564 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7899
0xa693c7 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9150
0xa6f9eb module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14797
0xa6feed module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18068
0xa6ffaf module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18726
0xa6a230 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9661
0xa6b046 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6662
0xa68a97 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7057
0xa68a97 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8927
0xa68ecf trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9145
0xa6acd1 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6413
0xa68a97 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7057
0xa68a97 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8927
0xa68ecf trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9145
0xa6acd1 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6413
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210331 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99855] [modules] ICE Error reporting routines re-entered.

2021-03-31 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99855

--- Comment #5 from Alexander Lelyakin  ---
I have seen all that stuff with compiler at 
commit d7145b4bb6c8729a1e782373cb6256c06ed60465

Let's see what will be tomorrow.

[Bug c++/99855] [modules] ICE Error reporting routines re-entered.

2021-03-31 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99855

--- Comment #4 from Alexander Lelyakin  ---
And next time same sequence run without error! 
All that with the same compiler, in empty dir.

[Bug c++/99855] [modules] ICE Error reporting routines re-entered.

2021-03-31 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99855

--- Comment #3 from Alexander Lelyakin  ---
malloc(): smallbin double linked list corrupted
In file included from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/fs_path.h:94:62: internal compiler error:
Aborted
   94 | using __safe_iterator_traits = std::iterator_traits<_Iter>;
  |  ^
0x11016bf crash_signal
../../gcc/gcc/toplev.c:327
0x1d47750 xrealloc
../../gcc/libiberty/xmalloc.c:179
0xa6d663 void va_heap::reserve(vec*&, unsigned int, bool)
../../gcc/gcc/vec.h:290
0xa6d663 vec::reserve(unsigned int, bool)
../../gcc/gcc/vec.h:1778
0xa6d663 vec::safe_push(tree_node* const&)
../../gcc/gcc/vec.h:1887
0xa6d663 trees_in::post_process(tree_node*)
../../gcc/gcc/cp/module.cc:2956
0xa6d663 trees_in::read_function_def(tree_node*, tree_node*)
../../gcc/gcc/cp/module.cc:11456
0xa6f7f1 module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14806
0xa6fe6d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18068
0xa6ff2f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18726
0xa6a1b0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9661
0xa7047a trees_in::decl_container()
../../gcc/gcc/cp/module.cc:10271
0xa7047a trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7887
0xa69347 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9150
0xa6f96b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14797
0xa6fe6d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18068
0xa6ff2f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18726
0xa6a1b0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9661
0xa692b9 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9200
0xa6b6c5 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6627
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c++/99855] [modules] ICE Error reporting routines re-entered.

2021-03-31 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99855

--- Comment #2 from Alexander Lelyakin  ---
Yes, attempting to repeat gives different message, but not same as by you:

malloc(): smallbin double linked list corrupted
In file included from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/shared_ptr.h:330:32: internal compiler
error: Aborted
  330 | #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
  |^~~
0x11016bf crash_signal
../../gcc/gcc/toplev.c:327
0x1d47750 xrealloc
../../gcc/libiberty/xmalloc.c:179
0x1cb82a7 diagnostic_classify_diagnostic(diagnostic_context*, int,
diagnostic_t, unsigned int)
../../gcc/gcc/diagnostic.c:864
0x1ca85ca control_warning_option(unsigned int, int, char const*, bool, unsigned
int, unsigned int, cl_option_handlers const*, gcc_options*, gcc_options*,
diagnostic_context*)
../../gcc/gcc/opts-common.c:1722
0xc00249 handle_pragma_diagnostic
../../gcc/gcc/c-family/c-pragma.c:849
0xaa63ab cp_parser_pragma
../../gcc/gcc/cp/parser.c:45198
0xaa7f4e cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:25793
0xaa7f4e cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:24877
0xaaa0a3 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:25193
0xaaa0a3 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:18440
0xaab039 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:15062
0xad5c46 cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:30426
0xad5fc6 cp_parser_template_declaration_after_parameters
../../gcc/gcc/cp/parser.c:30089
0xad6770 cp_parser_explicit_template_declaration
../../gcc/gcc/cp/parser.c:30355
0xad8e99 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14068
0xad8469 cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14166
0xad8469 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:13954
0xad8902 cp_parser_namespace_body
../../gcc/gcc/cp/parser.c:20454
0xad8902 cp_parser_namespace_definition
../../gcc/gcc/cp/parser.c:20432
0xad9058 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14117
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c++/99855] New: [modules] ICE Error reporting routines re-entered.

2021-03-31 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99855

Bug ID: 99855
   Summary: [modules] ICE Error reporting routines re-entered.
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header algorithm
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header thread
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header istream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header variant
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header functional
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cassert
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cinttypes
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cwctype
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header exception
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdlib
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header vector
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdio
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:53,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
 from /usr/local/include/c++/11.0.1/filesystem:45:


Internal compiler error: Error reporting routines re-entered.
0x877d94 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9816
0x6c7098 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/gcc/tree.h:3353
0x6c7098 dump_decl
../../gcc/gcc/cp/error.c:1259
0xa06c40 dump_scope
../../gcc/gcc/cp/error.c:234
0x9ff580 dump_aggr_type
../../gcc/gcc/cp/error.c:770
0xa00d85 dump_function_decl
../../gcc/gcc/cp/error.c:1715
0xa086d2 decl_as_string(tree_node*, int)
../../gcc/gcc/cp/error.c:3079
0xa086d2 lang_decl_name(tree_node*, int, bool)
../../gcc/gcc/cp/error.c:3114
0xb66217 cxx_printable_name_internal
../../gcc/gcc/cp/tree.c:2632
0xa09ddc cp_print_error_function
../../gcc/gcc/cp/error.c:3472
0xa09ddc cp_diagnostic_starter
../../gcc/gcc/cp/error.c:3426
0x1cb8972 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
../../gcc/gcc/diagnostic.c:1245
0x1cb8ede diagnostic_impl
../../gcc/gcc/diagnostic.c:1406
0x1cb9227 internal_error(char const*, ...)
../../gcc/gcc/diagnostic.c:1808
0x877d94 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9816
0x6c7098 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/gcc/tree.h:3353
0x6c7098 dump_decl
../../gcc/gcc/cp/error.c:1259
0xa06c40 dump_scope
../../gcc/gcc/cp/error.c:234
0x9ff580 dump_aggr_type
../../gcc/gcc/cp/error.c:770
0xa00d85 dump_function_decl
../../gcc/gcc/cp/error.c:1715
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210331 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99747] [modules] ICE in make_dependency, at cp/module.cc:12396

2021-03-31 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99747

--- Comment #1 from Alexander Lelyakin  ---
Not seen anymore.

[Bug c++/99223] [modules] stdl header-unit ICE

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99223

--- Comment #4 from Alexander Lelyakin  ---
Currently these two sequences produce same error:
 internal compiler error: in install_entity, at cp/module.cc:7464

Which is duplicate of 99241.

Should be closed.

[Bug c++/99222] [modules] system header-unit ICEs

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99222

Alexander Lelyakin  changed:

   What|Removed |Added

 CC||alexander.lelyakin@googlema
   ||il.com

--- Comment #1 from Alexander Lelyakin  ---
This is not more reproducible for more than month. Should be closed.

[Bug c++/99246] [modules] ICE in write_location, at cp/module.cc:15687

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99246

--- Comment #4 from Alexander Lelyakin  ---
This report is marked as resolved, but it is stable reproducible all the time.

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bit
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header istream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cmath
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bitset
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header new
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ciso646
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header thread
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In module imported at /usr/local/include/c++/11.0.1/sstream:38:1,
included from /usr/local/include/c++/11.0.1/regex:46:
/usr/local/include/c++/11.0.1/istream: note: unable to represent further
imported source locations
/usr/local/include/c++/11.0.1/regex: internal compiler error: in
write_location, at cp/module.cc:15593
0x6e02cf module_state::write_location(bytes_out&, unsigned int)
../../gcc/gcc/cp/module.cc:15593
0xa60ff3 trees_out::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:5900
0xa64464 trees_out::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7050
0xa64464 trees_out::tree_value(tree_node*)
../../gcc/gcc/cp/module.cc:8887
0xa604f4 trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9085
0xa6484a trees_out::write_var_def(tree_node*)
../../gcc/gcc/cp/module.cc:11472
0xa65ae5 module_state::write_cluster(elf_out*, depset**, unsigned int,
depset::hash&, unsigned int*, unsigned int*)
../../gcc/gcc/cp/module.cc:14648
0xa6743e module_state::write(elf_out*, cpp_reader*)
../../gcc/gcc/cp/module.cc:17720
0xa6801f finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:19831
0x9fb4cb c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210330 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99284] [modules] ICE in key_mergeable, at cp/module.cc:10441

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99284

--- Comment #2 from Alexander Lelyakin  ---
Not reproduced anymore.

[Bug c++/99427] [modules] in system headers: non-constant condition for static assertion

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99427

--- Comment #4 from Alexander Lelyakin  ---
Not reproduced anymore

[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283

--- Comment #16 from Alexander Lelyakin  ---
Still reproduces:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header system_error
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header type_traits
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ccomplex

In file included from /usr/local/include/c++/11.0.1/ios:42,
 from /usr/local/include/c++/11.0.1/istream:38,
 from /usr/local/include/c++/11.0.1/sstream:38,
 from /usr/local/include/c++/11.0.1/complex:45,
 from /usr/local/include/c++/11.0.1/ccomplex:39:
/usr/local/include/c++/11.0.1/bits/ios_base.h:205:69: internal compiler error:
in assert_definition, at cp/module.cc:4491
  205 |   template <> struct is_error_code_enum : public true_type {
};
  | ^
0x6e20eb trees_in::assert_definition(tree_node*, bool)
../../gcc/gcc/cp/module.cc:4491
0xa5db60 trees_in::odr_duplicate(tree_node*, bool)
../../gcc/gcc/cp/module.cc:11323
0xa6d21f trees_in::read_function_def(tree_node*, tree_node*)
../../gcc/gcc/cp/module.cc:11403
0xa6f711 module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14806
0xa6fd8d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18068
0xa6fe4f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18726
0xa6a0d0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9661
0xa6aee6 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6662
0xa68937 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7057
0xa68937 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8927
0xa68d6f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9145
0xa6ab71 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6413
0xa68937 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7057
0xa68937 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8927
0xa68d6f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9145
0xa6ab71 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6413
0xa68937 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7057
0xa68937 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8927
0xa68d6f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9145
0xa6ab71 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6413
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210330 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

commit 5f3c6027257118469a722816e228394b5978ddb0 (HEAD -> master, origin/trunk,
origin/master, origin/HEAD)
Author: Nathan Sidwell 
Date:   Tue Mar 30 09:45:59 2021 -0700

c++: duplicate const static members [PR 99283]

[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227

--- Comment #2 from Alexander Lelyakin  ---
I have started some script that continuously do following:
  git pull
  configure
  make 
  make install
  do 5000 attempts to compile system headers in random order
  upload the results of the attempts to http://lelyakin.de/modules

They are sorted by error message and by count of successfully compiled headers. 
Results are updated approximately every 7-8 hours.

Currently reproducible are the following errors:

99737 - Aborted
99479 - Aborted signal terminated program cc1plus
99722 - Segmentation fault
99426 - failed to read compiled module cluster
99283 - in assert_definition
99241 - in install_entity
99284 - in key_mergeable
99242 - in lookup_mark
99243 - in set_filename
99244 - in tsubst_copy
99246 - in write_location
99427 - non-constant condition for static assertion
99760 - qsort checking failed
99274 - wrong number of template arguments (1, should be 2

[Bug c++/99426] [modules] failed to read compiled module cluster 1186: Bad file data

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99426

--- Comment #4 from Alexander Lelyakin  ---
More sequences:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header system_error
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header iomanip

In module imported at /usr/local/include/c++/11.0.1/bits/locale_facets.h:44:1,
included from /usr/local/include/c++/11.0.1/locale:40,
 from /usr/local/include/c++/11.0.1/iomanip:43:
/usr/local/include/c++/11.0.1/streambuf: error: failed to read compiled module
cluster 1269: Bad file data
/usr/local/include/c++/11.0.1/streambuf: note: compiled module file is
‘gcm.cache/./usr/local/include/c++/11.0.1/streambuf.gcm’
In file included from /usr/local/include/c++/11.0.1/string:55,
 from /usr/local/include/c++/11.0.1/bits/locale_classes.h:40,
 from /usr/local/include/c++/11.0.1/bits/ios_base.h:41,
 from /usr/local/include/c++/11.0.1/iomanip:40:
/usr/local/include/c++/11.0.1/bits/basic_string.h:6607:40: fatal error: failed
to load pendings for ‘__gnu_cxx::__stoa’
 6607 |   { return __gnu_cxx::__stoa(::strtol, "stoi",
__str.c_str(),
  |   
^
 6608 | __idx, __base); }
  | ~~
compilation terminated.

g++ (GCC) 11.0.1 20210329 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header system_error
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header iomanip

In module imported at /usr/local/include/c++/11.0.1/bits/locale_facets.h:44:1,
included from /usr/local/include/c++/11.0.1/locale:40,
 from /usr/local/include/c++/11.0.1/iomanip:43:
/usr/local/include/c++/11.0.1/streambuf: error: failed to read compiled module
cluster 1269: Bad file data
/usr/local/include/c++/11.0.1/streambuf: note: compiled module file is
‘gcm.cache/./usr/local/include/c++/11.0.1/streambuf.gcm’
In file included from /usr/local/include/c++/11.0.1/string:55,
 from /usr/local/include/c++/11.0.1/bits/locale_classes.h:40,
 from /usr/local/include/c++/11.0.1/bits/ios_base.h:41,
 from /usr/local/include/c++/11.0.1/iomanip:40:
/usr/local/include/c++/11.0.1/bits/basic_string.h:6607:40: fatal error: failed
to load pendings for ‘__gnu_cxx::__stoa’
 6607 |   { return __gnu_cxx::__stoa(::strtol, "stoi",
__str.c_str(),
  |   
^
 6608 | __idx, __base); }
  | ~~
compilation terminated.


/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ios
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable

In module imported at /usr/local/include/c++/11.0.1/ostream:38:1,
included from /usr/local/include/c++/11.0.1/bits/unique_ptr.h:42,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:59,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/condition_variable:43:
/usr/local/include/c++/11.0.1/ios: error: failed to read compiled module
cluster 1295: Bad file data
/usr/local/include/c++/11.0.1/ios: note: compiled module file is
‘gcm.cache/./usr/local/include/c++/11.0.1/ios.gcm’
In file included from /usr/local/include/c++/11.0.1/string:55,
 from /usr/local/include/c++/11.0.1/stdexcept:39,
 from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/bits/std_mutex.h:39,
 from /usr/local/include/c++/11.0.1/condition_variable:40:
/usr/local/include/c++/11.0.1/bits/basic_string.h:6607:40: fatal error: failed
to load pendings for ‘__gnu_cxx::__stoa’
 6607 |   { return __gnu_cxx::__stoa(::strtol, "stoi",
__str.c_str(),
  |   
^
 6608 | __idx, __base); }
  | ~~
compilation terminated.

[Bug c++/99427] [modules] in system headers: non-constant condition for static assertion

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99427

--- Comment #3 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ios
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ccomplex

In file included from /usr/local/include/c++/11.0.1/sstream:38,
 from /usr/local/include/c++/11.0.1/complex:45,
 from /usr/local/include/c++/11.0.1/ccomplex:39:
/usr/local/include/c++/11.0.1/istream: In function ‘std::basic_istream<_CharT,
_Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT
(&)[_Num])’:
/usr/local/include/c++/11.0.1/istream:840:26: error: non-constant condition for
static assertion
  840 |   static_assert(_Num <=
__gnu_cxx::__numeric_traits::__max);
  |
~^
/usr/local/include/c++/11.0.1/istream:840:26: error: the value of
‘__gnu_cxx::__numeric_traits_integer::__max’ is not usable in a
constant expression
In file included from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:63,
 from /usr/local/include/c++/11.0.1/bits/char_traits.h:39,
 from /usr/local/include/c++/11.0.1/string_view:41,
of module /usr/local/include/c++/11.0.1/string_view, imported at
/usr/local/include/c++/11.0.1/bits/basic_string.h:48,
included from /usr/local/include/c++/11.0.1/string:55,
 from /usr/local/include/c++/11.0.1/bits/locale_classes.h:40,
 from /usr/local/include/c++/11.0.1/bits/ios_base.h:41,
 from /usr/local/include/c++/11.0.1/ios:42,
of module /usr/local/include/c++/11.0.1/ios, imported at
/usr/local/include/c++/11.0.1/istream:38,
included from /usr/local/include/c++/11.0.1/sstream:38,
 from /usr/local/include/c++/11.0.1/complex:45,
 from /usr/local/include/c++/11.0.1/ccomplex:39:
/usr/local/include/c++/11.0.1/ext/numeric_traits.h:75:27: note:
‘__gnu_cxx::__numeric_traits_integer::__max’ was not initialized with
a constant expression
   75 |   static const _Value __max = __is_signed
  |   ^
/usr/local/include/c++/11.0.1/ccomplex: At global scope:
/usr/local/include/c++/11.0.1/ccomplex: warning: not writing module
‘/usr/local/include/c++/11.0.1/ccomplex’ due to errors

g++ (GCC) 11.0.1 20210329 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99479] [modules] ICE Aborted signal terminated program cc1plus

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99479

--- Comment #8 from Alexander Lelyakin  ---
in last version:

commit 864caa158f6db6b653c6a88ff32ce5ce0b4660a8
Author: Jonathan Wakely 
Date:   Mon Mar 29 17:08:32 2021 +0100


I see that instead of short message, i have reported before, there is a long
list of error messages, followed by "corrupted double-linked list"

But I have still found a sequence that reproduces an old short message:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ranges
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_set
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header numbers
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bitset
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header array
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header complex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

corrupted double-linked list
corrupted double-linked list
g++: internal compiler error: Aborted signal terminated program cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

g++ (GCC) 11.0.1 20210329 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99735] [modules] in system headers: non-template type ‘rebind_alloc’ used as a template

2021-03-30 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99735

--- Comment #3 from Alexander Lelyakin  ---
After some commits of Nathan Sidwell a week or two ago this bug is not more
reproducible.

[Bug c++/99737] [modules] malloc(): smallbin double linked list corrupted

2021-03-27 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99737

--- Comment #3 from Alexander Lelyakin  ---
And the sequence from comment 1 has changed its error message to:

corrupted double-linked list
corrupted double-linked list
g++: internal compiler error: Aborted signal terminated program cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Probably this bug should be marked as duplicate of 99479.

[Bug c++/99737] [modules] malloc(): smallbin double linked list corrupted

2021-03-27 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99737

--- Comment #2 from Alexander Lelyakin  ---
This error is very unstable. 
Each found sequence is not reproducible after few commits.
But some other sequence appears with similar message.

This time such a sequence is:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header algorithm
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header thread
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header istream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header variant
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header functional
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cassert
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cinttypes
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cwctype
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header exception
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdlib
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header vector
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdio
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

malloc(): smallbin double linked list corrupted
In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:53,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/allocated_ptr.h: In destructor
‘std::__allocated_ptr<_Alloc>::~__allocated_ptr()’:
/usr/local/include/c++/11.0.1/bits/allocated_ptr.h:73:32: internal compiler
error: Aborted
   73 |   std::allocator_traits<_Alloc>::deallocate(*_M_alloc, _M_ptr,
1);
  |^
0x110151f crash_signal
../../gcc/gcc/toplev.c:327
0x1d47510 xrealloc
../../gcc/libiberty/xmalloc.c:179
0xa8eb0d void va_heap::reserve(vec*&,
unsigned int, bool)
../../gcc/gcc/vec.h:290
0xa8eb0d vec::reserve(unsigned int, bool)
../../gcc/gcc/vec.h:1778
0xa8eb0d vec::safe_push(cp_token* const&)
../../gcc/gcc/vec.h:1887
0xa8eb0d cp_lexer_save_tokens
../../gcc/gcc/cp/parser.c:1241
0xa8eb0d cp_parser_parse_tentatively
../../gcc/gcc/cp/parser.c:32847
0xabe86d cp_parser_type_name
../../gcc/gcc/cp/parser.c:19219
0xacb256 cp_parser_simple_type_specifier
../../gcc/gcc/cp/parser.c:18924
0xaa9e5d cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:18516
0xabbc23 cp_parser_type_specifier_seq
../../gcc/gcc/cp/parser.c:23367
0xaba2a4 cp_parser_type_id_1
../../gcc/gcc/cp/parser.c:23170
0xabc893 cp_parser_template_type_arg
../../gcc/gcc/cp/parser.c:23275
0xabc9bf cp_parser_template_argument
../../gcc/gcc/cp/parser.c:17915
0xabc9bf cp_parser_template_argument_list
../../gcc/gcc/cp/parser.c:17826
0xabc9bf cp_parser_enclosed_template_argument_list
../../gcc/gcc/cp/parser.c:30799
0xabdcec cp_parser_template_id
../../gcc/gcc/cp/parser.c:17398
0xabe3eb cp_parser_class_name
../../gcc/gcc/cp/parser.c:24692
0xab595a cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:7002
0xab595a cp_parser_nested_name_specifier_opt
../../gcc/gcc/cp/parser.c:6684
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210327 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


commit 651684b462f979a4e70a668c4c9767a5fd7d223a (HEAD -> master, origin/trunk,
origin/master, origin/HEAD)
Author: GCC Administrator 
Date:   Sat Mar 27 00:16:27 2021 +

Daily bump.

[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608

2021-03-27 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283

--- Comment #13 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ratio
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ios
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable

In file included from /usr/local/include/c++/11.0.1/bits/unique_ptr.h:42,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:59,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/condition_variable:43:
/usr/local/include/c++/11.0.1/ostream:58:42: internal compiler error: in
assert_definition, at cp/module.cc:4491
   58 | class basic_ostream : virtual public basic_ios<_CharT, _Traits>
  |  ^
0x6e20cf trees_in::assert_definition(tree_node*, bool)
../../gcc/gcc/cp/module.cc:4491
0xa5db10 trees_in::odr_duplicate(tree_node*, bool)
../../gcc/gcc/cp/module.cc:11321
0xa6d14f trees_in::read_function_def(tree_node*, tree_node*)
../../gcc/gcc/cp/module.cc:11401
0xa6f611 module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14800
0xa6fc8d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18062
0xa6fe48 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*)
../../gcc/gcc/cp/module.cc:18753
0xa81b8e name_lookup::search_namespace_only(tree_node*)
../../gcc/gcc/cp/name-lookup.c:928
0xa831bb name_lookup::search_unqualified(tree_node*, cp_binding_level*)
../../gcc/gcc/cp/name-lookup.c:1158
0xa85eb4 lookup_name_1
../../gcc/gcc/cp/name-lookup.c:7804
0xa8607a lookup_name(tree_node*, LOOK_where, LOOK_want)
../../gcc/gcc/cp/name-lookup.c:7824
0xa94d02 lookup_name(tree_node*, LOOK_want)
../../gcc/gcc/cp/name-lookup.h:401
0xa94d02 cp_parser_lookup_name
../../gcc/gcc/cp/parser.c:29375
0xabd64f cp_parser_template_name
../../gcc/gcc/cp/parser.c:17709
0xabdb8f cp_parser_template_id
../../gcc/gcc/cp/parser.c:17324
0xabe3eb cp_parser_class_name
../../gcc/gcc/cp/parser.c:24692
0xab595a cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:7002
0xab595a cp_parser_nested_name_specifier_opt
../../gcc/gcc/cp/parser.c:6684
0xaa974c cp_parser_base_specifier
../../gcc/gcc/cp/parser.c:26711
0xaa974c cp_parser_base_clause
../../gcc/gcc/cp/parser.c:26564
0xaa974c cp_parser_class_head
../../gcc/gcc/cp/parser.c:25651
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210327 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99737] [modules] malloc(): smallbin double linked list corrupted

2021-03-27 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99737

--- Comment #1 from Alexander Lelyakin  ---
Similar, but somewhat different message:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cwchar
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cmath
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header type_traits
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future

corrupted double-linked list
In file included from /usr/local/include/c++/11.0.1/future:43:
/usr/local/include/c++/11.0.1/bits/atomic_futex.h:171:36: internal compiler
error: Aborted
  171 | bool __equal, memory_order __mo,
  |^~~~
0x110151f crash_signal
../../gcc/gcc/toplev.c:327
0x1d474c4 xcalloc
../../gcc/libiberty/xmalloc.c:162
0xc2d30c alloc_page
../../gcc/gcc/ggc-page.c:918
0xc2d30c ggc_internal_alloc(unsigned long, void (*)(void*), unsigned long,
unsigned long)
../../gcc/gcc/ggc-page.c:1294
0xe16c69 ggc_internal_cleared_alloc(unsigned long, void (*)(void*), unsigned
long, unsigned long)
../../gcc/gcc/ggc-common.c:117
0xa25f78 ggc_internal_cleared_alloc(unsigned long)
../../gcc/gcc/ggc.h:143
0xa25f78 maybe_add_lang_decl_raw(tree_node*, bool)
../../gcc/gcc/cp/lex.c:903
0xa2626e retrofit_lang_decl(tree_node*)
../../gcc/gcc/cp/lex.c:972
0xa2626e retrofit_lang_decl(tree_node*)
../../gcc/gcc/cp/lex.c:967
0xac6725 cp_parser_parameter_declaration_list
../../gcc/gcc/cp/parser.c:23607
0xac6ab1 cp_parser_parameter_declaration_clause
../../gcc/gcc/cp/parser.c:23496
0xab7be3 cp_parser_direct_declarator
../../gcc/gcc/cp/parser.c:22145
0xab7be3 cp_parser_declarator
../../gcc/gcc/cp/parser.c:22008
0xacee48 cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:21506
0xad5c7b cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:30517
0xad5de6 cp_parser_template_declaration_after_parameters
../../gcc/gcc/cp/parser.c:30089
0xad6590 cp_parser_explicit_template_declaration
../../gcc/gcc/cp/parser.c:30355
0xaa7998 cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:25799
0xaa7998 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:24877
0xaa9ec3 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:25193
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210327 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99427] [modules] in system headers: non-constant condition for static assertion

2021-03-27 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99427

--- Comment #2 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ios
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
initializer_list
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header sstream

In file included from /usr/local/include/c++/11.0.1/sstream:38:
/usr/local/include/c++/11.0.1/istream: In function ‘std::basic_istream<_CharT,
_Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&, _CharT
(&)[_Num])’:
/usr/local/include/c++/11.0.1/istream:840:26: error: non-constant condition for
static assertion
  840 |   static_assert(_Num <=
__gnu_cxx::__numeric_traits::__max);
  |
~^
/usr/local/include/c++/11.0.1/istream:840:26: error: the value of
‘__gnu_cxx::__numeric_traits_integer::__max’ is not usable in a
constant expression
In file included from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:63,
 from /usr/local/include/c++/11.0.1/bits/char_traits.h:39,
 from /usr/local/include/c++/11.0.1/string_view:41,
of module /usr/local/include/c++/11.0.1/string_view, imported at
/usr/local/include/c++/11.0.1/bits/basic_string.h:48,
included from /usr/local/include/c++/11.0.1/string:55,
 from /usr/local/include/c++/11.0.1/bits/locale_classes.h:40,
 from /usr/local/include/c++/11.0.1/bits/ios_base.h:41,
 from /usr/local/include/c++/11.0.1/ios:42,
of module /usr/local/include/c++/11.0.1/ios, imported at
/usr/local/include/c++/11.0.1/istream:38,
included from /usr/local/include/c++/11.0.1/sstream:38:
/usr/local/include/c++/11.0.1/ext/numeric_traits.h:75:27: note:
‘__gnu_cxx::__numeric_traits_integer::__max’ was not initialized with
a constant expression
   75 |   static const _Value __max = __is_signed
  |   ^
/usr/local/include/c++/11.0.1/sstream: At global scope:
/usr/local/include/c++/11.0.1/sstream: warning: not writing module
‘/usr/local/include/c++/11.0.1/sstream’ due to errors

g++ (GCC) 11.0.1 20210326 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99243] [modules] ICE in set_filename, at cp/module.cc:19143

2021-03-27 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99243

--- Comment #1 from Alexander Lelyakin  ---
There is a shorter sequence

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header concepts
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header utility
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In file included from
/usr/local/include/c++/11.0.1/bits/stl_iterator_base_types.h:71,
 from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:65,
 from /usr/local/include/c++/11.0.1/algorithm:61,
 from /usr/local/include/c++/11.0.1/regex:38:
/usr/local/include/c++/11.0.1/bits/iterator_concepts.h:34: internal compiler
error: in set_filename, at cp/module.cc:19100
   34 | 
  | 
0x6e0cbb module_state::set_filename(Cody::Packet const&)
../../gcc/gcc/cp/module.cc:19100
0xa5a979 maybe_translate_include
../../gcc/gcc/cp/module.cc:19143
0xa5a979 maybe_translate_include
../../gcc/gcc/cp/module.cc:19114
0x1cf5606 _cpp_stack_file
../../gcc/libcpp/files.c:913
0x1ced69e do_include_common
../../gcc/libcpp/directives.c:853
0x1cedbe8 _cpp_handle_directive
../../gcc/libcpp/directives.c:541
0x1cfca60 _cpp_lex_token
../../gcc/libcpp/lex.c:2809
0x1d048c7 cpp_get_token_1
../../gcc/libcpp/macro.c:2839
0xbf070e c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int)
../../gcc/gcc/c-family/c-lex.c:470
0xa8ee76 cp_lexer_get_preprocessor_token
../../gcc/gcc/cp/parser.c:864
0xad93af cp_lexer_new_main
../../gcc/gcc/cp/parser.c:663
0xad93af c_parse_file()
../../gcc/gcc/cp/parser.c:45253
0xbfd98d c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1218
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210326 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99242] [modules] ICE in lookup_mark, at cp/tree.c:2403

2021-03-27 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99242

--- Comment #1 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header atomic
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header semaphore
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable

In file included from /usr/local/include/c++/11.0.1/condition_variable:47:
/usr/local/include/c++/11.0.1/stop_token:83:29: internal compiler error: in
lookup_mark, at cp/tree.c:2403
   83 | swap(stop_token& __rhs) noexcept
  | ^~~~
0x73cce0 lookup_mark(tree_node*, bool)
../../gcc/gcc/cp/tree.c:2403
0xa81c51 name_lookup::dedup(bool)
../../gcc/gcc/cp/name-lookup.c:482
0xa81c51 name_lookup::dedup(bool)
../../gcc/gcc/cp/name-lookup.c:477
0xa81c51 name_lookup::search_namespace_only(tree_node*)
../../gcc/gcc/cp/name-lookup.c:958
0xa831bb name_lookup::search_unqualified(tree_node*, cp_binding_level*)
../../gcc/gcc/cp/name-lookup.c:1158
0xa85eb4 lookup_name_1
../../gcc/gcc/cp/name-lookup.c:7804
0xa860c4 lookup_name(tree_node*, LOOK_where, LOOK_want)
../../gcc/gcc/cp/name-lookup.c:7824
0xa860c4 lookup_name(tree_node*)
../../gcc/gcc/cp/name-lookup.c:7832
0x9f2eca find_last_decl
../../gcc/gcc/cp/decl2.c:1509
0x9f2eca cplus_decl_attributes(tree_node**, tree_node*, int)
../../gcc/gcc/cp/decl2.c:1595
0x9d4b8c grokfndecl
../../gcc/gcc/cp/decl.c:10061
0x9dcddd grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
../../gcc/gcc/cp/decl.c:13579
0x9e9be8 grokmethod(cp_decl_specifier_seq*, cp_declarator const*, tree_node*)
../../gcc/gcc/cp/decl.c:17564
0xa9aa68 cp_parser_save_member_function_body
../../gcc/gcc/cp/parser.c:30663
0xad7a8a cp_parser_member_declaration
../../gcc/gcc/cp/parser.c:26326
0xaa7998 cp_parser_member_specification_opt
../../gcc/gcc/cp/parser.c:25799
0xaa7998 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:24877
0xaa9ec3 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:25193
0xaa9ec3 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:18440
0xaaae59 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:15062
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210326 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99479] [modules] ICE Aborted signal terminated program cc1plus

2021-03-27 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99479

--- Comment #6 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cerrno
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header csignal
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future

corrupted double-linked list
corrupted double-linked list
g++: internal compiler error: Aborted signal terminated program cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

g++ (GCC) 11.0.1 20210326 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608

2021-03-27 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283

--- Comment #12 from Alexander Lelyakin  ---
Still reproduces:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future

In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:53,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/condition_variable:43,
 from /usr/local/include/c++/11.0.1/future:39:
/usr/local/include/c++/11.0.1/bits/allocated_ptr.h:48:32: internal compiler
error: in assert_definition, at cp/module.cc:4491
   48 |   using pointer = typename allocator_traits<_Alloc>::pointer;
  |^~~~
0x6e20cf trees_in::assert_definition(tree_node*, bool)
../../gcc/gcc/cp/module.cc:4491
0xa5db10 trees_in::odr_duplicate(tree_node*, bool)
../../gcc/gcc/cp/module.cc:11321
0xa6d607 trees_in::read_var_def(tree_node*, tree_node*)
../../gcc/gcc/cp/module.cc:11509
0xa6f611 module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14800
0xa6fc8d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18062
0xa6fd4f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18720
0xa6a000 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9662
0xa6aaa1 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6414
0xa68867 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7058
0xa68867 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8928
0xa68c9f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9146
0xa6aaa1 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6414
0xa68867 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7058
0xa68867 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8928
0xa68c9f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9146
0xa6b1f2 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6622
0xa68867 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7058
0xa68867 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8928
0xa68c9f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9146
0xa6b200 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6623
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210326 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

commit 42a21b4cb540be93548a6ff6d4cb4a73ab1665be

[Bug c++/99734] [modules] ICE in most_specialized_instantiation

2021-03-25 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99734

--- Comment #2 from Alexander Lelyakin  ---
Not reproduced anymore.

The first case has changed diagnostic to: 
  wrong number of template arguments (1, should be 2) [99274]

The second case has changed diagnostic to: 
  non-template type ‘rebind_alloc’ used as a template [99735]

[Bug c++/99760] New: [modules] ICE qsort checking failed

2021-03-24 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99760

Bug ID: 99760
   Summary: [modules] ICE qsort checking failed
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdint
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cctype
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header optional
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header syncstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_set
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header limits
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cinttypes
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header latch
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header clocale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header coroutine
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header codecvt
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header csetjmp
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header exception
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cassert
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header complex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header algorithm
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdarg
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header istream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ciso646
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header execution
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ostream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header queue
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header valarray
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header random
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cfloat
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ccomplex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header concepts
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header iomanip
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header csignal
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header stack
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ios
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In module imported at /usr/local/include/c++/11.0.1/sstream:39:1,
included from /usr/local/include/c++/11.0.1/regex:46:
/usr/local/include/c++/11.0.1/ostream: note: unable to represent further
imported source locations
/usr/local/include/c++/11.0.1/regex: error: qsort comparator non-negative on
sorted output: 1
/usr/local/include/c++/11.0.1/regex: internal compiler error: qsort checking
failed
0x92825b qsort_chk_error
../../gcc/gcc/vec.c:214
0x928367 qsort_chk(void*, unsigned long, unsigned long, int (*)(void const*,
void const*, void*), void*)
../../gcc/gcc/vec.c:256
0x1ce4c25 gcc_qsort(void*, unsigned long, unsigned long, int (*)(void const*,
void const*))
../../gcc/gcc/sort.cc:270
0xa66c1e vec::qsort(int (*)(void const*, void
const*))
../../gcc/gcc/vec.h:1148
0xa66c1e vec::qsort(int (*)(void const*, void
const*))
../../gcc/gcc/vec.h:2041
0xa66c1e module_state::write(elf_out*, cpp_reader*)
../../gcc/gcc/cp/module.cc:17661
0xa67e3f finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:19883
0x9fb24b c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210324 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608

2021-03-24 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283

--- Comment #9 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future

In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:53,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/condition_variable:43,
 from /usr/local/include/c++/11.0.1/future:39:
/usr/local/include/c++/11.0.1/bits/allocated_ptr.h:48:32: internal compiler
error: in assert_definition, at cp/module.cc:4484
   48 |   using pointer = typename allocator_traits<_Alloc>::pointer;
  |^~~~
0x6e204d trees_in::assert_definition(tree_node*, bool)
../../gcc/gcc/cp/module.cc:4484
0xa5d810 trees_in::odr_duplicate(tree_node*, bool)
../../gcc/gcc/cp/module.cc:11362
0xa6d497 trees_in::read_var_def(tree_node*, tree_node*)
../../gcc/gcc/cp/module.cc:11550
0xa6f4a1 module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14855
0xa6fb1d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18117
0xa6fbdf module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18778
0xa69e80 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9700
0xa6a921 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6407
0xa686e7 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7051
0xa686e7 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8966
0xa68b1f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9184
0xa6a921 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6407
0xa686e7 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7051
0xa686e7 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8966
0xa68b1f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9184
0xa6b072 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6615
0xa686e7 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7051
0xa686e7 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8966
0xa68b1f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9184
0xa6b080 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6616
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210324 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99479] [modules] ICE Aborted signal terminated program cc1plus

2021-03-24 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99479

--- Comment #5 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cwchar
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cmath
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header type_traits
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future

corrupted double-linked list
corrupted double-linked list
g++: internal compiler error: Aborted signal terminated program cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

g++ (GCC) 11.0.1 20210324 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99241] [modules] ICE in install_entity, at cp/module.cc:7584

2021-03-24 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99241

--- Comment #2 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable

In file included from /usr/local/include/c++/11.0.1/bits/ios_base.h:41,
 from /usr/local/include/c++/11.0.1/ios:42,
 from /usr/local/include/c++/11.0.1/ostream:38,
 from /usr/local/include/c++/11.0.1/bits/unique_ptr.h:42,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:59,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/condition_variable:43:
/usr/local/include/c++/11.0.1/bits/locale_classes.h:163:23: internal compiler
error: in install_entity, at cp/module.cc:7457
  163 | locale(const std::string& __s) : locale(__s.c_str()) { }
  |   ^~
0xa68138 trees_in::install_entity(tree_node*)
../../gcc/gcc/cp/module.cc:7457
0xa7063b trees_in::decl_value()
../../gcc/gcc/cp/module.cc:8009
0xa69017 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9189
0xa6f61b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14846
0xa6fb1d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18117
0xa6fbdf module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18778
0xa69e80 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9700
0xa6b4d2 trees_in::lang_decl_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6860
0xa703ea trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7053
0xa703ea trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7962
0xa69017 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9189
0xa6a1cc trees_in::chained_decls()
../../gcc/gcc/cp/module.cc:4832
0xa6af79 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6534
0xa686e7 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7051
0xa686e7 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8966
0xa68b1f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9184
0xa6af87 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6536
0xa686e7 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7051
0xa686e7 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8966
0xa68b1f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9184
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210324 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99426] [modules] failed to read compiled module cluster 1186: Bad file data

2021-03-24 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99426

--- Comment #3 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header system_error
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header complex

In module imported at /usr/local/include/c++/11.0.1/ios:43:1,
included from /usr/local/include/c++/11.0.1/istream:38,
 from /usr/local/include/c++/11.0.1/sstream:38,
 from /usr/local/include/c++/11.0.1/complex:45:
/usr/local/include/c++/11.0.1/streambuf: error: failed to read compiled module
cluster 1269: Bad file data
/usr/local/include/c++/11.0.1/streambuf: note: compiled module file is
‘gcm.cache/./usr/local/include/c++/11.0.1/streambuf.gcm’
In file included from /usr/local/include/c++/11.0.1/string:55,
 from /usr/local/include/c++/11.0.1/bits/locale_classes.h:40,
 from /usr/local/include/c++/11.0.1/bits/ios_base.h:41,
 from /usr/local/include/c++/11.0.1/ios:42,
 from /usr/local/include/c++/11.0.1/istream:38,
 from /usr/local/include/c++/11.0.1/sstream:38,
 from /usr/local/include/c++/11.0.1/complex:45:
/usr/local/include/c++/11.0.1/bits/basic_string.h:6608:54: fatal error: failed
to load pendings for ‘__gnu_cxx::__stoa’
 6608 | __idx, __base); }
  |  ^
compilation terminated.

g++ (GCC) 11.0.1 20210324 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99427] [modules] in system headers: non-constant condition for static assertion

2021-03-24 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99427

--- Comment #1 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header deque
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable

In file included from /usr/local/include/c++/11.0.1/semaphore:35,
 from /usr/local/include/c++/11.0.1/stop_token:37,
 from /usr/local/include/c++/11.0.1/condition_variable:47:
/usr/local/include/c++/11.0.1/bits/semaphore_base.h: In instantiation of
‘struct std::__atomic_semaphore’:
/usr/local/include/c++/11.0.1/bits/semaphore_base.h:292:45:   required from
here
/usr/local/include/c++/11.0.1/bits/semaphore_base.h:172:23: error: non-constant
condition for static assertion
  171 |   static_assert(__gnu_cxx::__int_traits<_Tp>::__max
  |   ~
  172 |   <= __gnu_cxx::__int_traits::__max);
  |   ^~~~
/usr/local/include/c++/11.0.1/bits/semaphore_base.h:172:23: error: the value of
‘__gnu_cxx::__numeric_traits_integer::__max’ is not usable in a
constant expression
In file included from /usr/local/include/c++/11.0.1/bits/stl_algobase.h:63,
 from /usr/local/include/c++/11.0.1/bits/char_traits.h:39,
 from /usr/local/include/c++/11.0.1/string_view:41,
of module /usr/local/include/c++/11.0.1/string_view, imported at
/usr/local/include/c++/11.0.1/bits/basic_string.h:48,
included from /usr/local/include/c++/11.0.1/string:55,
of module /usr/local/include/c++/11.0.1/string, imported at
/usr/local/include/c++/11.0.1/stdexcept:39,
included from /usr/local/include/c++/11.0.1/system_error:41,
 from /usr/local/include/c++/11.0.1/bits/std_mutex.h:39,
 from /usr/local/include/c++/11.0.1/condition_variable:40:
/usr/local/include/c++/11.0.1/ext/numeric_traits.h:75:27: note:
‘__gnu_cxx::__numeric_traits_integer::__max’ was not initialized with
a constant expression
   75 |   static const _Value __max = __is_signed
  |   ^
/usr/local/include/c++/11.0.1/condition_variable: warning: not writing module
‘/usr/local/include/c++/11.0.1/condition_variable’ due to errors

g++ (GCC) 11.0.1 20210324 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99735] [modules] in system headers: non-template type ‘rebind_alloc’ used as a template

2021-03-24 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99735

--- Comment #1 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

In file included from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/fs_path.h: In instantiation of
‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>
std::filesystem::__cxx11::path::generic_string(const _Allocator&) const [with
_CharT = char; _Traits = std::char_traits; _Allocator =
std::allocator]’:
/usr/local/include/c++/11.0.1/bits/fs_path.h:1165:33:   required from here
/usr/local/include/c++/11.0.1/bits/fs_path.h:1131:13: error: non-template type
‘rebind_alloc’ used as a template
 1131 |   using _Alloc2 = typename allocator_traits<_Allocator>::template
  | ^~~
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
 1133 |   basic_string, _Alloc2>
__str(__a);
  |  ^
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
/usr/local/include/c++/11.0.1/bits/fs_path.h: In instantiation of
‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>
std::filesystem::__cxx11::path::generic_string(const _Allocator&) const [with
_CharT = wchar_t; _Traits = std::char_traits; _Allocator =
std::allocator]’:
/usr/local/include/c++/11.0.1/bits/fs_path.h:1170:36:   required from here
/usr/local/include/c++/11.0.1/bits/fs_path.h:1131:13: error: non-template type
‘rebind_alloc’ used as a template
 1131 |   using _Alloc2 = typename allocator_traits<_Allocator>::template
  | ^~~
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
 1133 |   basic_string, _Alloc2>
__str(__a);
  |  ^
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
/usr/local/include/c++/11.0.1/bits/fs_path.h: In instantiation of
‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>
std::filesystem::__cxx11::path::generic_string(const _Allocator&) const [with
_CharT = char8_t; _Traits = std::char_traits; _Allocator =
std::allocator]’:
/usr/local/include/c++/11.0.1/bits/fs_path.h:1176:36:   required from here
/usr/local/include/c++/11.0.1/bits/fs_path.h:1131:13: error: non-template type
‘rebind_alloc’ used as a template
 1131 |   using _Alloc2 = typename allocator_traits<_Allocator>::template
  | ^~~
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
 1133 |   basic_string, _Alloc2>
__str(__a);
  |  ^
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
/usr/local/include/c++/11.0.1/bits/fs_path.h: In instantiation of
‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>
std::filesystem::__cxx11::path::generic_string(const _Allocator&) const [with
_CharT = char16_t; _Traits = std::char_traits; _Allocator =
std::allocator]’:
/usr/local/include/c++/11.0.1/bits/fs_path.h:1185:37:   required from here
/usr/local/include/c++/11.0.1/bits/fs_path.h:1131:13: error: non-template type
‘rebind_alloc’ used as a template
 1131 |   using _Alloc2 = typename allocator_traits<_Allocator>::template
  | ^~~
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
 1133 |   basic_string, _Alloc2>
__str(__a);
  |  ^
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
/usr/local/include/c++/11.0.1/bits/fs_path.h: In instantiation of
‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>
std::filesystem::__cxx11::path::generic_string(const _Allocator&) const [with
_CharT = char32_t; _Traits = std::char_traits; _Allocator =
std::allocator]’:
/usr/local/include/c++/11.0.1/bits/fs_path.h:1189:37:   required from here
/usr/local/include/c++/11.0.1/bits/fs_path.h:1131:13: error: non-template type
‘rebind_alloc’ used as a template
 1131 |   using _Alloc2 = typename allocator_traits<_Allocator>::template
  | ^~~
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
 1133 |   basic_string, _Alloc2>
__str(__a);
  |  ^
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template

[Bug c++/99246] [modules] ICE in write_location, at cp/module.cc:15687

2021-03-24 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99246

--- Comment #3 from Alexander Lelyakin  ---
This ICE appeared again, gcc at commit
bf1f3168f474734400e7a97660d1e7dec664bca9:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bit
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header istream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cmath
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header bitset
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header new
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ciso646
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header memory
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header thread
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In module imported at /usr/local/include/c++/11.0.1/sstream:38:1,
included from /usr/local/include/c++/11.0.1/regex:46:
/usr/local/include/c++/11.0.1/istream: note: unable to represent further
imported source locations
/usr/local/include/c++/11.0.1/regex: internal compiler error: in
write_location, at cp/module.cc:15642
0x6e02e9 module_state::write_location(bytes_out&, unsigned int)
../../gcc/gcc/cp/module.cc:15642
0xa60e13 trees_out::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:5894
0xa64244 trees_out::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7044
0xa64244 trees_out::tree_value(tree_node*)
../../gcc/gcc/cp/module.cc:8926
0xa60314 trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9124
0xa6462a trees_out::write_var_def(tree_node*)
../../gcc/gcc/cp/module.cc:11511
0xa658c5 module_state::write_cluster(elf_out*, depset**, unsigned int,
depset::hash&, unsigned int*, unsigned int*)
../../gcc/gcc/cp/module.cc:14697
0xa6721e module_state::write(elf_out*, cpp_reader*)
../../gcc/gcc/cp/module.cc:17769
0xa67dff finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:19883
0x9fb20b c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210324 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99747] New: [modules] ICE in make_dependency, at cp/module.cc:12396

2021-03-24 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99747

Bug ID: 99747
   Summary: [modules] ICE in make_dependency, at
cp/module.cc:12396
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable

/usr/local/include/c++/11.0.1/condition_variable: internal compiler error: in
make_dependency, at cp/module.cc:12396
0x6e0f92 depset::hash::make_dependency(tree_node*, depset::entity_kind)
../../gcc/gcc/cp/module.cc:12396
0xa58954 depset::hash::add_dependency(tree_node*, depset::entity_kind)
../../gcc/gcc/cp/module.cc:12599
0xa5fd4a trees_out::decl_node(tree_node*, walk_kind)
../../gcc/gcc/cp/module.cc:8558
0xa604b2 trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9119
0xa63346 trees_out::decl_container(tree_node*)
../../gcc/gcc/cp/module.cc:10289
0xa5e353 trees_out::decl_value(tree_node*, depset*)
../../gcc/gcc/cp/module.cc:7610
0xa662d1 depset::hash::find_dependencies(module_state*)
../../gcc/gcc/cp/module.cc:13157
0xa66968 module_state::write(elf_out*, cpp_reader*)
../../gcc/gcc/cp/module.cc:17636
0xa67dff finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:19883
0x9fb20b c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210323 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608

2021-03-24 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283

--- Comment #8 from Alexander Lelyakin  ---
Still reproducible:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header charconv
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header fstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cfloat
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ios
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

In file included from /usr/local/include/c++/11.0.1/bits/unique_ptr.h:42,
 from /usr/local/include/c++/11.0.1/bits/locale_conv.h:41,
 from /usr/local/include/c++/11.0.1/locale:43,
 from /usr/local/include/c++/11.0.1/bits/fs_path.h:37,
 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/ostream:58:42: internal compiler error: in
assert_definition, at cp/module.cc:4484
   58 | class basic_ostream : virtual public basic_ios<_CharT, _Traits>
  |  ^
0x6e204d trees_in::assert_definition(tree_node*, bool)
../../gcc/gcc/cp/module.cc:4484
0xa5d810 trees_in::odr_duplicate(tree_node*, bool)
../../gcc/gcc/cp/module.cc:11362
0xa6d773 trees_in::read_class_def(tree_node*, tree_node*)
../../gcc/gcc/cp/module.cc:11842
0xa6f4a1 module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14855
0xa6fb1d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18117
0xa6fcd8 lazy_load_binding(unsigned int, tree_node*, tree_node*, binding_slot*)
../../gcc/gcc/cp/module.cc:18811
0xa81ace name_lookup::search_namespace_only(tree_node*)
../../gcc/gcc/cp/name-lookup.c:928
0xa830fb name_lookup::search_unqualified(tree_node*, cp_binding_level*)
../../gcc/gcc/cp/name-lookup.c:1158
0xa84cf4 lookup_name_1
../../gcc/gcc/cp/name-lookup.c:7802
0xa84eba lookup_name(tree_node*, LOOK_where, LOOK_want)
../../gcc/gcc/cp/name-lookup.c:7822
0xa94c62 lookup_name(tree_node*, LOOK_want)
../../gcc/gcc/cp/name-lookup.h:401
0xa94c62 cp_parser_lookup_name
../../gcc/gcc/cp/parser.c:29368
0xabd58f cp_parser_template_name
../../gcc/gcc/cp/parser.c:17708
0xabdacf cp_parser_template_id
../../gcc/gcc/cp/parser.c:17317
0xabe32b cp_parser_class_name
../../gcc/gcc/cp/parser.c:24685
0xab589a cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:7002
0xab589a cp_parser_nested_name_specifier_opt
../../gcc/gcc/cp/parser.c:6684
0xaa96ac cp_parser_base_specifier
../../gcc/gcc/cp/parser.c:26704
0xaa96ac cp_parser_base_clause
../../gcc/gcc/cp/parser.c:26557
0xaa96ac cp_parser_class_head
../../gcc/gcc/cp/parser.c:25644
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210323 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gcc at commit be70bb5e4babdf9d3d33e8f4658452038407fa8e

[Bug c++/99737] New: [modules] malloc(): smallbin double linked list corrupted

2021-03-23 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99737

Bug ID: 99737
   Summary: [modules] malloc(): smallbin double linked list
corrupted
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header sstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstring
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header numeric
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header limits
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cuchar
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

malloc(): smallbin double linked list corrupted
In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:53,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/bits/fs_path.h:46,
 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/allocated_ptr.h:58:66: internal compiler
error: Aborted
   58 |typename _Req = _Require>>
  |  ^~
0x110107f crash_signal
../../gcc/gcc/toplev.c:327
0x1d46680 xrealloc
../../gcc/libiberty/xmalloc.c:179
0xa6d283 void va_heap::reserve(vec*&, unsigned int, bool)
../../gcc/gcc/vec.h:290
0xa6d283 vec::reserve(unsigned int, bool)
../../gcc/gcc/vec.h:1778
0xa6d283 vec::safe_push(tree_node* const&)
../../gcc/gcc/vec.h:1887
0xa6d283 trees_in::post_process(tree_node*)
../../gcc/gcc/cp/module.cc:2956
0xa6d283 trees_in::read_function_def(tree_node*, tree_node*)
../../gcc/gcc/cp/module.cc:11495
0xa6f3e1 module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14855
0xa6fa5d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18117
0xa6fb1f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18778
0xa72d37 lazy_load_pendings(tree_node*)
../../gcc/gcc/cp/module.cc:18871
0xb2237f lookup_template_class_1
../../gcc/gcc/cp/pt.c:9799
0xb23f4c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc/gcc/cp/pt.c:10237
0xb4c28b finish_template_type(tree_node*, tree_node*, int)
../../gcc/gcc/cp/semantics.c:3563
0xabe061 cp_parser_template_id
../../gcc/gcc/cp/parser.c:17458
0xabe24b cp_parser_class_name
../../gcc/gcc/cp/parser.c:24685
0xab57ba cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:7002
0xab57ba cp_parser_nested_name_specifier_opt
../../gcc/gcc/cp/parser.c:6684
0xacaf34 cp_parser_simple_type_specifier
../../gcc/gcc/cp/parser.c:18851
0xaa9cdd cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:18509
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210323 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99479] [modules] ICE Aborted signal terminated program cc1plus

2021-03-23 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99479

--- Comment #4 from Alexander Lelyakin  ---
There is a shorter sequence:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdalign
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ranges
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header atomic
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

corrupted double-linked list
corrupted double-linked list
g++: internal compiler error: Aborted signal terminated program cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

g++ (GCC) 11.0.1 20210323 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99735] New: [modules] in system headers: non-template type ‘rebind_alloc’ used as a template

2021-03-23 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99735

Bug ID: 99735
   Summary: [modules] in system headers: non-template type
‘rebind_alloc’ used as a template
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header ccomplex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header system_error
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_map
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header numbers
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstddef
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header variant
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header complex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header stack
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header sstream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header charconv
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

In file included from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/fs_path.h: In instantiation of
‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>
std::filesystem::__cxx11::path::generic_string(const _Allocator&) const [with
_CharT = char; _Traits = std::char_traits; _Allocator =
std::allocator]’:
/usr/local/include/c++/11.0.1/bits/fs_path.h:1165:33:   required from here
/usr/local/include/c++/11.0.1/bits/fs_path.h:1131:13: error: non-template type
‘rebind_alloc’ used as a template
 1131 |   using _Alloc2 = typename allocator_traits<_Allocator>::template
  | ^~~
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
 1133 |   basic_string, _Alloc2>
__str(__a);
  |  ^
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
/usr/local/include/c++/11.0.1/bits/fs_path.h: In instantiation of
‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>
std::filesystem::__cxx11::path::generic_string(const _Allocator&) const [with
_CharT = wchar_t; _Traits = std::char_traits; _Allocator =
std::allocator]’:
/usr/local/include/c++/11.0.1/bits/fs_path.h:1170:36:   required from here
/usr/local/include/c++/11.0.1/bits/fs_path.h:1131:13: error: non-template type
‘rebind_alloc’ used as a template
 1131 |   using _Alloc2 = typename allocator_traits<_Allocator>::template
  | ^~~
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
 1133 |   basic_string, _Alloc2>
__str(__a);
  |  ^
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
/usr/local/include/c++/11.0.1/bits/fs_path.h: In instantiation of
‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>
std::filesystem::__cxx11::path::generic_string(const _Allocator&) const [with
_CharT = char8_t; _Traits = std::char_traits; _Allocator =
std::allocator]’:
/usr/local/include/c++/11.0.1/bits/fs_path.h:1176:36:   required from here
/usr/local/include/c++/11.0.1/bits/fs_path.h:1131:13: error: non-template type
‘rebind_alloc’ used as a template
 1131 |   using _Alloc2 = typename allocator_traits<_Allocator>::template
  | ^~~
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
 1133 |   basic_string, _Alloc2>
__str(__a);
  |  ^
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
/usr/local/include/c++/11.0.1/bits/fs_path.h: In instantiation of
‘std::__cxx11::basic_string<_CharT, _Traits, _Allocator>
std::filesystem::__cxx11::path::generic_string(const _Allocator&) const [with
_CharT = char16_t; _Traits = std::char_traits; _Allocator =
std::allocator]’:
/usr/local/include/c++/11.0.1/bits/fs_path.h:1185:37:   required from here
/usr/local/include/c++/11.0.1/bits/fs_path.h:1131:13: error: non-template type
‘rebind_alloc’ used as a template
 1131 |   using _Alloc2 = typename allocator_traits<_Allocator>::template
  | ^~~
/usr/local/include/c++/11.0.1/bits/fs_path.h:1133:66: error: non-template type
‘rebind_alloc’ used as a template
 1133 |   basic_string, 

[Bug c++/99734] [modules] ICE in most_specialized_instantiation

2021-03-23 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99734

--- Comment #1 from Alexander Lelyakin  ---
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

In file included from /usr/local/include/c++/11.0.1/bits/locale_classes.h:857,
 from /usr/local/include/c++/11.0.1/locale:39,
 from /usr/local/include/c++/11.0.1/bits/fs_path.h:37,
 from /usr/local/include/c++/11.0.1/filesystem:45:
/usr/local/include/c++/11.0.1/bits/locale_classes.tcc:275:44: internal compiler
error: in most_specialized_instantiation, at cp/pt.c:24830
  275 | use_facet >(const locale&);
  |^
0x725070 most_specialized_instantiation(tree_node*)
../../gcc/gcc/cp/pt.c:24830
0xb2e1e9 determine_specialization
../../gcc/gcc/cp/pt.c:2457
0xb3418c determine_specialization
../../gcc/gcc/cp/pt.c:2156
0xb3418c check_explicit_specialization(tree_node*, tree_node*, int, int,
tree_node*)
../../gcc/gcc/cp/pt.c:3121
0x9d481e grokfndecl
../../gcc/gcc/cp/decl.c:10064
0x9db1f3 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
../../gcc/gcc/cp/decl.c:13910
0xac82c1 cp_parser_explicit_instantiation
../../gcc/gcc/cp/parser.c:18240
0xad8840 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14096
0xad80e9 cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14159
0xad80e9 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:13947
0xad8582 cp_parser_namespace_body
../../gcc/gcc/cp/parser.c:20447
0xad8582 cp_parser_namespace_definition
../../gcc/gcc/cp/parser.c:20425
0xad8cd8 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14110
0xad952c cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14159
0xad952c cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4942
0xad952c c_parse_file()
../../gcc/gcc/cp/parser.c:45250
0xbfd51d c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1218
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210323 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99734] New: [modules] ICE in most_specialized_instantiation

2021-03-23 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99734

Bug ID: 99734
   Summary: [modules] ICE in most_specialized_instantiation
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header system_error
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future

In file included from /usr/local/include/c++/11.0.1/bits/locale_classes.h:857,
 from /usr/local/include/c++/11.0.1/bits/ios_base.h:41,
 from /usr/local/include/c++/11.0.1/ios:42,
 from /usr/local/include/c++/11.0.1/ostream:38,
 from /usr/local/include/c++/11.0.1/bits/unique_ptr.h:42,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:59,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/condition_variable:43,
 from /usr/local/include/c++/11.0.1/future:39:
/usr/local/include/c++/11.0.1/bits/locale_classes.tcc:275:44: internal compiler
error: in most_specialized_instantiation, at cp/pt.c:24830
  275 | use_facet >(const locale&);
  |^
0x725070 most_specialized_instantiation(tree_node*)
../../gcc/gcc/cp/pt.c:24830
0xb2e1e9 determine_specialization
../../gcc/gcc/cp/pt.c:2457
0xb3418c determine_specialization
../../gcc/gcc/cp/pt.c:2156
0xb3418c check_explicit_specialization(tree_node*, tree_node*, int, int,
tree_node*)
../../gcc/gcc/cp/pt.c:3121
0x9d481e grokfndecl
../../gcc/gcc/cp/decl.c:10064
0x9db1f3 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
../../gcc/gcc/cp/decl.c:13910
0xac82c1 cp_parser_explicit_instantiation
../../gcc/gcc/cp/parser.c:18240
0xad8840 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14096
0xad80e9 cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14159
0xad80e9 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:13947
0xad8582 cp_parser_namespace_body
../../gcc/gcc/cp/parser.c:20447
0xad8582 cp_parser_namespace_definition
../../gcc/gcc/cp/parser.c:20425
0xad8cd8 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14110
0xad952c cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14159
0xad952c cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4942
0xad952c c_parse_file()
../../gcc/gcc/cp/parser.c:45250
0xbfd51d c_common_parse_file()
../../gcc/gcc/c-family/c-opts.c:1218
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210323 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99479] [modules] ICE Aborted signal terminated program cc1plus

2021-03-23 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99479

--- Comment #3 from Alexander Lelyakin  ---
in gcc version 20210323:
All three sequences now produce "Segmentation fault" instead of "corrupted
double-linked list".

However the error "corrupted double-linked list" is still reproducible:

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cstdarg
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header source_location
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header locale
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header compare
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header concepts
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cinttypes
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header numeric
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header iostream
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header variant
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header iosfwd
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header cwchar
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem

corrupted double-linked list
corrupted double-linked list
g++: internal compiler error: Aborted signal terminated program cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

g++ (GCC) 11.0.1 20210323 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99722] New: [modules] internal compiler error: segmentation fault

2021-03-23 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99722

Bug ID: 99722
   Summary: [modules] internal compiler error: segmentation fault
   Product: gcc
   Version: 11.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header
condition_variable
/usr/local/bin/g++ -std=c++20 -fmodules-ts -x c++-system-header future

In file included from /usr/local/include/c++/11.0.1/future:43:
/usr/local/include/c++/11.0.1/bits/atomic_futex.h:82:7: internal compiler
error: Segmentation fault
   82 | { }
  |   ^
0x110102f crash_signal
../../gcc/gcc/toplev.c:327
0xc2cbc9 clear_marks
../../gcc/gcc/ggc-page.c:1895
0xc2e19c ggc_collect()
../../gcc/gcc/ggc-page.c:2219
0xace681 cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:30027
0xaceb2c cp_parser_late_parsing_for_member
../../gcc/gcc/cp/parser.c:30921
0xaa8df3 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:25162
0xaa9d03 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:25186
0xaa9d03 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:18433
0xaaac99 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:15055
0xad5886 cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:30419
0xad5c06 cp_parser_template_declaration_after_parameters
../../gcc/gcc/cp/parser.c:30082
0xad63b0 cp_parser_explicit_template_declaration
../../gcc/gcc/cp/parser.c:30348
0xad8ad9 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14061
0xad80a9 cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14159
0xad80a9 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:13947
0xad8542 cp_parser_namespace_body
../../gcc/gcc/cp/parser.c:20447
0xad8542 cp_parser_namespace_definition
../../gcc/gcc/cp/parser.c:20425
0xad8c98 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14110
0xad94ec cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14159
0xad94ec cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4942
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210323 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
---
gcc at commit: 441e1980cea7265c340868468cd63ea8c046ddec

[Bug c++/99484] [modules] ICE same canonical type node for different types ‘void’ and ‘std::__void_t<_Op<_Args ...> >’

2021-03-23 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99484

--- Comment #4 from Alexander Lelyakin  ---
Not seen anymore. At least in version 20210322.

[Bug c++/99274] [modules] Error compiling some system headers: "wrong number of template arguments (1, should be 2)"

2021-03-12 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99274

--- Comment #1 from Alexander Lelyakin  ---
Previously I have seen such message only in connection with ,
but it happends also without it. 
Another header causing such error is :

g++ -std=c++20 -fmodules-ts -x c++-system-header iterator
g++ -std=c++20 -fmodules-ts -x c++-system-header regex

In file included from /usr/local/include/c++/11.0.1/locale:40,
 from /usr/local/include/c++/11.0.1/regex:44:
/usr/local/include/c++/11.0.1/bits/locale_facets.h:121:31: error: wrong number
of template arguments (1, should be 2)
  121 | ostreambuf_iterator<_CharT>
  |   ^
In file included from /usr/local/include/c++/11.0.1/algorithm:61,
 from /usr/local/include/c++/11.0.1/regex:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:454:11: note: provided for
‘template class std::ostreambuf_iterator’
  454 | class ostreambuf_iterator;
  |   ^~~
In file included from /usr/local/include/c++/11.0.1/locale:40,
 from /usr/local/include/c++/11.0.1/regex:44:
/usr/local/include/c++/11.0.1/bits/locale_facets.h:122:39: error: wrong number
of template arguments (1, should be 2)
  122 | __write(ostreambuf_iterator<_CharT> __s, const _CharT* __ws, int
__len)
  |   ^
In file included from /usr/local/include/c++/11.0.1/algorithm:61,
 from /usr/local/include/c++/11.0.1/regex:38:
/usr/local/include/c++/11.0.1/bits/stl_algobase.h:454:11: note: provided for
‘template class std::ostreambuf_iterator’
  454 | class ostreambuf_iterator;
  |   ^~~
In file included from /usr/local/include/c++/11.0.1/locale:40,
 from /usr/local/include/c++/11.0.1/regex:44:
/usr/local/include/c++/11.0.1/bits/locale_facets.h: In function ‘int
std::__write(int, const _CharT*, int)’:
/usr/local/include/c++/11.0.1/bits/locale_facets.h:124:11: error: request for
member ‘_M_put’ in ‘__s’, which is of non-class type ‘int’
  124 |   __s._M_put(__ws, __len);
  |   ^~
/usr/local/include/c++/11.0.1/regex: At global scope:
/usr/local/include/c++/11.0.1/regex: warning: not writing module
‘/usr/local/include/c++/11.0.1/regex’ due to errors

g++ (GCC) 11.0.1 20210312 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99283] [modules] ICE in assert_definition, at cp/module.cc:4608

2021-03-12 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99283

--- Comment #5 from Alexander Lelyakin  ---
In several previous version this message was not seen, but after last commits:

g++ -std=c++20 -fmodules-ts -x c++-system-header syncstream
g++ -std=c++20 -fmodules-ts -x c++-system-header vector
g++ -std=c++20 -fmodules-ts -x c++-system-header filesystem
g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
g++ -std=c++20 -fmodules-ts -x c++-system-header numbers
g++ -std=c++20 -fmodules-ts -x c++-system-header mutex
g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_set
g++ -std=c++20 -fmodules-ts -x c++-system-header stack
g++ -std=c++20 -fmodules-ts -x c++-system-header future

In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:53,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/condition_variable:43,
 from /usr/local/include/c++/11.0.1/future:39:
/usr/local/include/c++/11.0.1/bits/allocated_ptr.h:48:32: internal compiler
error: in assert_definition, at cp/module.cc:4489
   48 |   using pointer = typename allocator_traits<_Alloc>::pointer;
  |^~~~
0x6e1aff trees_in::assert_definition(tree_node*, bool)
../../gcc/gcc/cp/module.cc:4489
0xa5ca00 trees_in::odr_duplicate(tree_node*, bool)
../../gcc/gcc/cp/module.cc:11351
0xa6c637 trees_in::read_var_def(tree_node*, tree_node*)
../../gcc/gcc/cp/module.cc:11543
0xa6e641 module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14842
0xa6ecbd module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18104
0xa6ed7f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18758
0xa68fc0 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9681
0xa69a61 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6412
0xa67827 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7056
0xa67827 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8947
0xa67c5f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9165
0xa69a61 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6412
0xa67827 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7056
0xa67827 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8947
0xa67c5f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9165
0xa6a1b2 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6620
0xa67827 trees_in::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7056
0xa67827 trees_in::tree_value()
../../gcc/gcc/cp/module.cc:8947
0xa67c5f trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9165
0xa6a1c0 trees_in::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:6621
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210312 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99227] [meta] [modules] Bugs relating to header-units of STL header files

2021-03-12 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99227
Bug 99227 depends on bug 99238, which changed state.

Bug 99238 Summary: [modules] internal compiler error: segmentation fault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99238

   What|Removed |Added

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

[Bug c++/99238] [modules] internal compiler error: segmentation fault

2021-03-12 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99238

Alexander Lelyakin  changed:

   What|Removed |Added

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

--- Comment #7 from Alexander Lelyakin  ---
g++ -std=c++20 -fmodules-ts -x c++-system-header condition_variable
g++ -std=c++20 -fmodules-ts -x c++-system-header numbers
g++ -std=c++20 -fmodules-ts -x c++-system-header type_traits
g++ -std=c++20 -fmodules-ts -x c++-system-header future

In file included from /usr/local/include/c++/11.0.1/future:43:
/usr/local/include/c++/11.0.1/bits/atomic_futex.h:82:7: internal compiler
error: Segmentation fault
   82 | { }
  |   ^
0x10ffe0f crash_signal
../../gcc/gcc/toplev.c:327
0xc2bb99 clear_marks
../../gcc/gcc/ggc-page.c:1895
0xc2d16c ggc_collect()
../../gcc/gcc/ggc-page.c:2219
0xacd901 cp_parser_function_definition_after_declarator
../../gcc/gcc/cp/parser.c:30020
0xacddac cp_parser_late_parsing_for_member
../../gcc/gcc/cp/parser.c:30914
0xaa80a3 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:25158
0xaa8fb3 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:25182
0xaa8fb3 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:18429
0xaa9f49 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:15051
0xad4b06 cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:30412
0xad4e86 cp_parser_template_declaration_after_parameters
../../gcc/gcc/cp/parser.c:30075
0xad5630 cp_parser_explicit_template_declaration
../../gcc/gcc/cp/parser.c:30341
0xad7d59 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14057
0xad7329 cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14155
0xad7329 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:13943
0xad77c2 cp_parser_namespace_body
../../gcc/gcc/cp/parser.c:20443
0xad77c2 cp_parser_namespace_definition
../../gcc/gcc/cp/parser.c:20421
0xad7f18 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14106
0xad876c cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14155
0xad876c cp_parser_translation_unit
../../gcc/gcc/cp/parser.c:4940
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210312 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99240] [modules] ICE in get_merge_kind, at cp/module.cc:10169

2021-03-12 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99240

--- Comment #2 from Alexander Lelyakin  ---
Not seen anymore  in version 20210311.

[Bug c++/99479] [modules] ICE Aborted signal terminated program cc1plus

2021-03-12 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99479

--- Comment #2 from Alexander Lelyakin  ---
There is a shorter sequence:

g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_map
g++ -std=c++20 -fmodules-ts -x c++-system-header deque
g++ -std=c++20 -fmodules-ts -x c++-system-header condition_variable
g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
g++ -std=c++20 -fmodules-ts -x c++-system-header future

corrupted double-linked list
corrupted double-linked list
g++: internal compiler error: Aborted signal terminated program cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

g++ (GCC) 11.0.1 20210311 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99425] [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803

2021-03-11 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99425

--- Comment #2 from Alexander Lelyakin  ---
The same sequence now breaks earlier with different message:
g++ -std=c++20 -fmodules-ts -x c++-system-header map
g++ -std=c++20 -fmodules-ts -x c++-system-header vector
g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
g++ -std=c++20 -fmodules-ts -x c++-system-header span
g++ -std=c++20 -fmodules-ts -x c++-system-header mutex

/usr/local/include/c++/11.0.1/mutex: internal compiler error: in key_mergeable,
at cp/module.cc:10366
0x6e249f trees_out::key_mergeable(int, merge_kind, tree_node*, tree_node*,
tree_node*, depset*)
../../gcc/gcc/cp/module.cc:10366
0xa5b3b5 trees_out::decl_value(tree_node*, depset*)
../../gcc/gcc/cp/module.cc:7625
0xa63251 depset::hash::find_dependencies(module_state*)
../../gcc/gcc/cp/module.cc:13139
0xa638e8 module_state::write(elf_out*, cpp_reader*)
../../gcc/gcc/cp/module.cc:17618
0xa64d7f finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:19858
0x9f835b c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

g++ (GCC) 11.0.1 20210311 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99481] [modules] ICE tree check: expected template_decl, have function_decl in decl_value, at cp/module.cc:7938

2021-03-11 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99481

--- Comment #1 from Alexander Lelyakin  ---
Not seen anymore in version 20210311

[Bug c++/99426] [modules] failed to read compiled module cluster 1186: Bad file data

2021-03-11 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99426

--- Comment #2 from Alexander Lelyakin  ---
There is a shorter sequence:
g++ -std=c++20 -fmodules-ts -x c++-system-header typeindex
g++ -std=c++20 -fmodules-ts -x c++-system-header stop_token
g++ -std=c++20 -fmodules-ts -x c++-system-header optional
g++ -std=c++20 -fmodules-ts -x c++-system-header system_error
g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
g++ -std=c++20 -fmodules-ts -x c++-system-header exception
g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_map
g++ -std=c++20 -fmodules-ts -x c++-system-header complex

In module imported at /usr/local/include/c++/11.0.1/ios:43:1,
included from /usr/local/include/c++/11.0.1/istream:38,
 from /usr/local/include/c++/11.0.1/sstream:38,
 from /usr/local/include/c++/11.0.1/complex:45:
/usr/local/include/c++/11.0.1/streambuf: error: failed to read compiled module
cluster 1269: Bad file data
/usr/local/include/c++/11.0.1/streambuf: note: compiled module file is
‘gcm.cache/./usr/local/include/c++/11.0.1/streambuf.gcm’
In file included from /usr/local/include/c++/11.0.1/string:55,
 from /usr/local/include/c++/11.0.1/bits/locale_classes.h:40,
 from /usr/local/include/c++/11.0.1/bits/ios_base.h:41,
 from /usr/local/include/c++/11.0.1/ios:42,
 from /usr/local/include/c++/11.0.1/istream:38,
 from /usr/local/include/c++/11.0.1/sstream:38,
 from /usr/local/include/c++/11.0.1/complex:45:
/usr/local/include/c++/11.0.1/bits/basic_string.h:6608:54: fatal error: failed
to load pendings for ‘__gnu_cxx::__stoa’
 6608 | __idx, __base); }
  |  ^
compilation terminated.

g++ (GCC) 11.0.1 20210311 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99484] [modules] ICE same canonical type node for different types ‘void’ and ‘std::__void_t<_Op<_Args ...> >’

2021-03-11 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99484

--- Comment #2 from Alexander Lelyakin  ---
One more similar, but not the same message;

g++ -std=c++20 -fmodules-ts -x c++-system-header any
g++ -std=c++20 -fmodules-ts -x c++-system-header vector
g++ -std=c++20 -fmodules-ts -x c++-system-header sstream
g++ -std=c++20 -fmodules-ts -x c++-system-header shared_mutex
g++ -std=c++20 -fmodules-ts -x c++-system-header version
g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_set
g++ -std=c++20 -fmodules-ts -x c++-system-header string_view
g++ -std=c++20 -fmodules-ts -x c++-system-header new
g++ -std=c++20 -fmodules-ts -x c++-system-header complex

In file included from /usr/local/include/c++/11.0.1/istream:39,
 from /usr/local/include/c++/11.0.1/sstream:38,
of module /usr/local/include/c++/11.0.1/sstream, imported at
/usr/local/include/c++/11.0.1/complex:45:
/usr/local/include/c++/11.0.1/ostream: In instantiation of ‘struct
std::__is_convertible_to_basic_ostream&>’:
/usr/local/include/c++/11.0.1/ostream:773:5:   required by substitution of
‘template typename
std::enable_if >,
std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable::__ostream_type, const _Tp&, void>
>::value, typename
std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type
std::operator<<(_Ostream&&, const _Tp&) [with _Ostream =
std::basic_ostream&; _Tp = std::complex]’
/usr/local/include/c++/11.0.1/complex:1539:70:   required from here
/usr/local/include/c++/11.0.1/ostream:732:12: internal compiler error: same
canonical type node for different types ‘void’ and ‘std::__void_t::type*>()))>’
  732 | struct __is_convertible_to_basic_ostream
  |^
0xb7f8dd comptypes(tree_node*, tree_node*, int)
../../gcc/gcc/cp/typeck.c:1554
0xae4bff template_args_equal(tree_node*, tree_node*, bool)
../../gcc/gcc/cp/pt.c:9207
0xae4758 template_args_equal(tree_node*, tree_node*, bool)
../../gcc/gcc/cp/pt.c:9170
0xae4758 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
../../gcc/gcc/cp/pt.c:9254
0xae4758 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
../../gcc/gcc/cp/pt.c:9234
0xaee073 spec_hasher::equal(spec_entry*, spec_entry*)
../../gcc/gcc/cp/pt.c:1725
0xb33b96 hash_table::verify(spec_entry*
const&, unsigned int)
../../gcc/gcc/hash-table.h:1032
0xb3413e hash_table::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
../../gcc/gcc/hash-table.h:968
0xaf101b add_mergeable_specialization(bool, spec_entry*, tree_node*, unsigned
int)
../../gcc/gcc/cp/pt.c:30018
0xa6ef5f trees_in::decl_value()
../../gcc/gcc/cp/module.cc:8068
0xa67017 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9174
0xa6d66b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14858
0xa6db6d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18129
0xa6dc2f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18783
0xa70e67 lazy_load_pendings(tree_node*)
../../gcc/gcc/cp/module.cc:18876
0xb2045f lookup_template_class_1
../../gcc/gcc/cp/pt.c:9799
0xb227f6 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc/gcc/cp/pt.c:10237
0xb227f6 tsubst_aggr_type
../../gcc/gcc/cp/pt.c:13572
0xb2f505 instantiate_class_template_1
../../gcc/gcc/cp/pt.c:11882
0xb30f32 instantiate_class_template(tree_node*)
../../gcc/gcc/cp/pt.c:12264
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210310 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99479] [modules] ICE Aborted signal terminated program cc1plus

2021-03-11 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99479

--- Comment #1 from Alexander Lelyakin  ---
There is a shorter sequence:

g++ -std=c++20 -fmodules-ts -x c++-system-header condition_variable
g++ -std=c++20 -fmodules-ts -x c++-system-header future

corrupted double-linked list
corrupted double-linked list
g++: internal compiler error: Aborted signal terminated program cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

g++ (GCC) 11.0.1 20210310 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99248] [modules] ICE expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013

2021-03-11 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99248

--- Comment #2 from Alexander Lelyakin  ---
There is much shorter sequence in last version 20210310:

g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
g++ -std=c++20 -fmodules-ts -x c++-system-header istream

In file included from /usr/local/include/c++/11.0.1/bits/locale_facets.h:2682,
 from /usr/local/include/c++/11.0.1/bits/basic_ios.h:37,
 from /usr/local/include/c++/11.0.1/ios:44,
 from /usr/local/include/c++/11.0.1/istream:38:
/usr/local/include/c++/11.0.1/bits/locale_facets.tcc:42:12: internal compiler
error: tree check: expected binding_vector, have overload in
lookup_elaborated_type_1, at cp/name-lookup.c:7943
   42 | struct __use_cache
  |^~~
0x875bfa tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9816
0x6eb804 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/gcc/tree.h:3353
0x6eb804 lookup_elaborated_type_1
../../gcc/gcc/cp/name-lookup.c:7943
0x6eb804 lookup_elaborated_type(tree_node*, TAG_how)
../../gcc/gcc/cp/name-lookup.c:8034
0x9c5385 lookup_and_check_tag
../../gcc/gcc/cp/decl.c:15080
0x9c5741 xref_tag_1
../../gcc/gcc/cp/decl.c:15194
0x9c5c90 xref_tag(tag_types, tree_node*, TAG_how, bool)
../../gcc/gcc/cp/decl.c:15327
0xaa75c2 cp_parser_class_head
../../gcc/gcc/cp/parser.c:25586
0xaa75c2 cp_parser_class_specifier_1
../../gcc/gcc/cp/parser.c:24803
0xaa7f23 cp_parser_class_specifier
../../gcc/gcc/cp/parser.c:25182
0xaa7f23 cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:18429
0xaa8eb9 cp_parser_decl_specifier_seq
../../gcc/gcc/cp/parser.c:15051
0xad3a76 cp_parser_single_declaration
../../gcc/gcc/cp/parser.c:30412
0xad3df6 cp_parser_template_declaration_after_parameters
../../gcc/gcc/cp/parser.c:30075
0xad45a0 cp_parser_explicit_template_declaration
../../gcc/gcc/cp/parser.c:30341
0xad6cc9 cp_parser_declaration
../../gcc/gcc/cp/parser.c:14057
0xad6299 cp_parser_toplevel_declaration
../../gcc/gcc/cp/parser.c:14155
0xad6299 cp_parser_declaration_seq_opt
../../gcc/gcc/cp/parser.c:13943
0xad6732 cp_parser_namespace_body
../../gcc/gcc/cp/parser.c:20443
0xad6732 cp_parser_namespace_definition
../../gcc/gcc/cp/parser.c:20421
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210310 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99484] [modules] ICE same canonical type node for different types ‘void’ and ‘std::__void_t<_Op<_Args ...> >’

2021-03-11 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99484

--- Comment #1 from Alexander Lelyakin  ---
In current version 20210310 I have seen another, but very similar error
message:

g++ -std=c++20 -fmodules-ts -x c++-system-header memory_resource
g++ -std=c++20 -fmodules-ts -x c++-system-header thread
g++ -std=c++20 -fmodules-ts -x c++-system-header version
g++ -std=c++20 -fmodules-ts -x c++-system-header array
g++ -std=c++20 -fmodules-ts -x c++-system-header latch
g++ -std=c++20 -fmodules-ts -x c++-system-header syncstream
g++ -std=c++20 -fmodules-ts -x c++-system-header cstddef
g++ -std=c++20 -fmodules-ts -x c++-system-header type_traits
g++ -std=c++20 -fmodules-ts -x c++-system-header list
g++ -std=c++20 -fmodules-ts -x c++-system-header unordered_map

In module /usr/local/include/c++/11.0.1/type_traits, imported at
/usr/local/include/c++/11.0.1/unordered_map:38:
/usr/local/include/c++/11.0.1/type_traits: In instantiation of ‘struct
std::is_copy_assignable’:
/usr/local/include/c++/11.0.1/type_traits:138:12:   required from ‘struct
std::__and_, std::is_copy_assignable >’
/usr/local/include/c++/11.0.1/bits/stl_pair.h:390:7:   required from ‘struct
std::pair’
/usr/local/include/c++/11.0.1/bits/hashtable_policy.h:577:5:   required from
here
/usr/local/include/c++/11.0.1/type_traits:1057:12: internal compiler error:
same canonical type node for different types ‘void’ and ‘std::__void_t<_Tp&>’
 1057 | struct is_copy_assignable
  |^~
0xb7f8dd comptypes(tree_node*, tree_node*, int)
../../gcc/gcc/cp/typeck.c:1554
0xae4bff template_args_equal(tree_node*, tree_node*, bool)
../../gcc/gcc/cp/pt.c:9207
0xae4758 template_args_equal(tree_node*, tree_node*, bool)
../../gcc/gcc/cp/pt.c:9170
0xae4758 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
../../gcc/gcc/cp/pt.c:9254
0xae4758 comp_template_args(tree_node*, tree_node*, tree_node**, tree_node**,
bool)
../../gcc/gcc/cp/pt.c:9234
0xaee073 spec_hasher::equal(spec_entry*, spec_entry*)
../../gcc/gcc/cp/pt.c:1725
0xb3400e hash_table::find_slot_with_hash(spec_entry* const&, unsigned int,
insert_option)
../../gcc/gcc/hash-table.h:981
0xaf101b add_mergeable_specialization(bool, spec_entry*, tree_node*, unsigned
int)
../../gcc/gcc/cp/pt.c:30018
0xa6ef5f trees_in::decl_value()
../../gcc/gcc/cp/module.cc:8068
0xa67017 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9174
0xa6d66b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14858
0xa6db6d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18129
0xa6dc2f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18783
0xa70e67 lazy_load_pendings(tree_node*)
../../gcc/gcc/cp/module.cc:18876
0xb2045f lookup_template_class_1
../../gcc/gcc/cp/pt.c:9799
0xb227f6 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc/gcc/cp/pt.c:10237
0xb227f6 tsubst_aggr_type
../../gcc/gcc/cp/pt.c:13572
0xaf87ad tsubst_qualified_id
../../gcc/gcc/cp/pt.c:16365
0xafab79 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
../../gcc/gcc/cp/pt.c:19865
0xb04508 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
../../gcc/gcc/cp/pt.c:19115
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210310 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99483] [modules] ICE tree check: expected tree_vec, have bind_expr in lookup_template_class_1, at cp/pt.c:9803

2021-03-11 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99483

--- Comment #1 from Alexander Lelyakin  ---
Disappeared in version 20210310.

[Bug c++/99482] [modules] ICE tree check: expected tree_vec, have addr_expr in lookup_template_class_1, at cp/pt.c:9803

2021-03-11 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99482

--- Comment #1 from Alexander Lelyakin  ---
Disappeared in version 20210310

[Bug c++/99426] [modules] failed to read compiled module cluster 1186: Bad file data

2021-03-09 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99426

--- Comment #1 from Alexander Lelyakin  ---
in version 20210308 diagnostic changed:
In file included from /usr/local/include/c++/11.0.1/iomanip:45:
/usr/local/include/c++/11.0.1/bits/quoted_string.h: In destructor ‘constexpr
std::allocator<  >::~allocator() [with _Tp =
char32_t]’:
/usr/local/include/c++/11.0.1/bits/quoted_string.h:69:29: internal compiler
error: tree check: expected template_decl, have function_decl in decl_value, at
cp/module.cc:7938
   69 |   struct _Quoted_string, _CharT>
  | ^
0x875ba8 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9814
0x6e61c9 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/gcc/tree.h:3353
0x6e61c9 trees_in::decl_value()
../../gcc/gcc/cp/module.cc:7938
0xa66d17 trees_in::tree_node(bool)
../../gcc/gcc/cp/module.cc:9174
0xa6d36b module_state::read_cluster(unsigned int)
../../gcc/gcc/cp/module.cc:14858
0xa6d86d module_state::load_section(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18125
0xa6d92f module_state::lazy_load(unsigned int, binding_slot*)
../../gcc/gcc/cp/module.cc:18779
0xa70b67 lazy_load_pendings(tree_node*)
../../gcc/gcc/cp/module.cc:18872
0xa79448 maybe_lazily_declare
../../gcc/gcc/cp/name-lookup.c:1922
0xa79448 get_class_binding(tree_node*, tree_node*, bool)
../../gcc/gcc/cp/name-lookup.c:1958
0xb3c3be lookup_field_r
../../gcc/gcc/cp/search.c:1023
0xb3c646 dfs_walk_all(tree_node*, tree_node* (*)(tree_node*, void*), tree_node*
(*)(tree_node*, void*), void*)
../../gcc/gcc/cp/search.c:1453
0xb3c646 lookup_member(tree_node*, tree_node*, int, bool, int,
access_failure_info*)
../../gcc/gcc/cp/search.c:1166
0xa759c5 get_class_binding
../../gcc/gcc/cp/name-lookup.c:5327
0xa7cebf outer_binding(tree_node*, cxx_binding*, bool)
../../gcc/gcc/cp/name-lookup.c:7641
0xa8182a check_local_shadow
../../gcc/gcc/cp/name-lookup.c:3143
0xa85d8b do_pushdecl
../../gcc/gcc/cp/name-lookup.c:3767
0xa872d2 do_pushdecl
../../gcc/gcc/cp/name-lookup.c:3846
0xa872d2 pushdecl(tree_node*, bool)
../../gcc/gcc/cp/name-lookup.c:3846
0x9c61f1 do_push_parm_decls(tree_node*, tree_node*, tree_node**)
../../gcc/gcc/cp/decl.c:16847
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug c++/99238] [modules] internal compiler error: segmentation fault

2021-03-09 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99238

--- Comment #3 from Alexander Lelyakin  ---
About half of sequences of headers producing segmentation fault are stopped on
.
However there are another variants:

g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
g++ -std=c++20 -fmodules-ts -x c++-system-header locale

/usr/local/include/c++/11.0.1/locale: internal compiler error: Segmentation
fault
0x10fee8f crash_signal
../../gcc/gcc/toplev.c:327
0x6deab8 trees_out::get_tag(tree_node*)
../../gcc/gcc/cp/module.cc:4783
0x6deab8 trees_out::ref_node(tree_node*)
../../gcc/gcc/cp/module.cc:7090
0x6deab8 trees_out::ref_node(tree_node*)
../../gcc/gcc/cp/module.cc:7073
0xa5dfdc trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:8978
0xa5fec9 trees_out::type_node(tree_node*)
../../gcc/gcc/cp/module.cc:8701
0xa5e3da trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9061
0xa5fccc trees_out::type_node(tree_node*)
../../gcc/gcc/cp/module.cc:8619
0xa5e3da trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9061
0xa60104 trees_out::type_node(tree_node*)
../../gcc/gcc/cp/module.cc:8728
0xa5e3da trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9061
0xa5ed0f trees_out::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:5993
0xa5fbec trees_out::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7053
0xa5fbec trees_out::fn_parms_init(tree_node*)
../../gcc/gcc/cp/module.cc:9992
0xa5c4c4 trees_out::decl_value(tree_node*, depset*)
../../gcc/gcc/cp/module.cc:7625
0xa63fd1 depset::hash::find_dependencies(module_state*)
../../gcc/gcc/cp/module.cc:13169
0xa64668 module_state::write(elf_out*, cpp_reader*)
../../gcc/gcc/cp/module.cc:17644
0xa65aff finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:19884
0x9f901b c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210308 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99425] [modules] ICE tree check: expected tree_vec, have tree_list in lookup_template_class_1, at cp/pt.c:9803

2021-03-09 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99425

--- Comment #1 from Alexander Lelyakin  ---
There is a shorter sequence:

g++ -std=c++20 -fmodules-ts -x c++-system-header map
g++ -std=c++20 -fmodules-ts -x c++-system-header vector
g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
g++ -std=c++20 -fmodules-ts -x c++-system-header span
g++ -std=c++20 -fmodules-ts -x c++-system-header mutex
g++ -std=c++20 -fmodules-ts -x c++-system-header utility
g++ -std=c++20 -fmodules-ts -x c++-system-header ctime
g++ -std=c++20 -fmodules-ts -x c++-system-header forward_list
g++ -std=c++20 -fmodules-ts -x c++-system-header deque
g++ -std=c++20 -fmodules-ts -x c++-system-header variant
g++ -std=c++20 -fmodules-ts -x c++-system-header functional
g++ -std=c++20 -fmodules-ts -x c++-system-header future

In file included from /usr/local/include/c++/11.0.1/bits/shared_ptr_base.h:53,
 from /usr/local/include/c++/11.0.1/bits/shared_ptr.h:53,
 from /usr/local/include/c++/11.0.1/condition_variable:43,
 from /usr/local/include/c++/11.0.1/future:39:
/usr/local/include/c++/11.0.1/bits/allocated_ptr.h:58:65: internal compiler
error: tree check: expected tree_vec, have tree_list in
lookup_template_class_1, at cp/pt.c:9803
   58 |typename _Req = _Require>>
  | ^
0x875ba8 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9814
0x71d266 tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/gcc/tree.h:3353
0x71d266 lookup_template_class_1
../../gcc/gcc/cp/pt.c:9803
0xb21d6c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
../../gcc/gcc/cp/pt.c:10237
0xb49ffb finish_template_type(tree_node*, tree_node*, int)
../../gcc/gcc/cp/semantics.c:3498
0xabbf41 cp_parser_template_id
../../gcc/gcc/cp/parser.c:17444
0xabc12b cp_parser_class_name
../../gcc/gcc/cp/parser.c:24671
0xab36ba cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:6994
0xab36ba cp_parser_nested_name_specifier_opt
../../gcc/gcc/cp/parser.c:6676
0xac8e14 cp_parser_simple_type_specifier
../../gcc/gcc/cp/parser.c:18837
0xaa7bad cp_parser_type_specifier
../../gcc/gcc/cp/parser.c:18495
0xab9973 cp_parser_type_specifier_seq
../../gcc/gcc/cp/parser.c:23346
0xab7ff4 cp_parser_type_id_1
../../gcc/gcc/cp/parser.c:23149
0xaba5d3 cp_parser_template_type_arg
../../gcc/gcc/cp/parser.c:23254
0xaba6ff cp_parser_template_argument
../../gcc/gcc/cp/parser.c:17894
0xaba6ff cp_parser_template_argument_list
../../gcc/gcc/cp/parser.c:17805
0xaba6ff cp_parser_enclosed_template_argument_list
../../gcc/gcc/cp/parser.c:30775
0xabba2c cp_parser_template_id
../../gcc/gcc/cp/parser.c:17377
0xabc12b cp_parser_class_name
../../gcc/gcc/cp/parser.c:24671
0xab36ba cp_parser_qualifying_entity
../../gcc/gcc/cp/parser.c:6994
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210308 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99239] [modules] internal compiler error: in duplicate_decls

2021-03-09 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99239

--- Comment #2 from Alexander Lelyakin  ---
(In reply to Alexander Lelyakin from comment #1)
> About half of sequences of headers producing segmentation fault are stopped
> on .
> However there are another variants:
> 
> g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
> g++ -std=c++20 -fmodules-ts -x c++-system-header locale

Sorry this was for another bug

[Bug c++/99239] [modules] internal compiler error: in duplicate_decls

2021-03-08 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99239

--- Comment #1 from Alexander Lelyakin  ---
About half of sequences of headers producing segmentation fault are stopped on
.
However there are another variants:

g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
g++ -std=c++20 -fmodules-ts -x c++-system-header locale

/usr/local/include/c++/11.0.1/locale: internal compiler error: Segmentation
fault
0x10fee8f crash_signal
../../gcc/gcc/toplev.c:327
0x6deab8 trees_out::get_tag(tree_node*)
../../gcc/gcc/cp/module.cc:4783
0x6deab8 trees_out::ref_node(tree_node*)
../../gcc/gcc/cp/module.cc:7090
0x6deab8 trees_out::ref_node(tree_node*)
../../gcc/gcc/cp/module.cc:7073
0xa5dfdc trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:8978
0xa5fec9 trees_out::type_node(tree_node*)
../../gcc/gcc/cp/module.cc:8701
0xa5e3da trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9061
0xa5fccc trees_out::type_node(tree_node*)
../../gcc/gcc/cp/module.cc:8619
0xa5e3da trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9061
0xa60104 trees_out::type_node(tree_node*)
../../gcc/gcc/cp/module.cc:8728
0xa5e3da trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9061
0xa5ed0f trees_out::core_vals(tree_node*)
../../gcc/gcc/cp/module.cc:5993
0xa5fbec trees_out::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7053
0xa5fbec trees_out::fn_parms_init(tree_node*)
../../gcc/gcc/cp/module.cc:9992
0xa5c4c4 trees_out::decl_value(tree_node*, depset*)
../../gcc/gcc/cp/module.cc:7625
0xa63fd1 depset::hash::find_dependencies(module_state*)
../../gcc/gcc/cp/module.cc:13169
0xa64668 module_state::write(elf_out*, cpp_reader*)
../../gcc/gcc/cp/module.cc:17644
0xa65aff finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:19884
0x9f901b c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210308 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[Bug c++/99238] [modules] internal compiler error: segmentation fault

2021-03-08 Thread alexander.lelyakin at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99238

--- Comment #2 from Alexander Lelyakin  ---
Even shorter sequence:

g++ -std=c++20 -fmodules-ts -x c++-system-header stdexcept
g++ -std=c++20 -fmodules-ts -x c++-system-header stop_token

/usr/local/include/c++/11.0.1/stop_token: internal compiler error: Segmentation
fault
0x10fee8f crash_signal
../../gcc/gcc/toplev.c:327
0x6deab8 trees_out::get_tag(tree_node*)
../../gcc/gcc/cp/module.cc:4783
0x6deab8 trees_out::ref_node(tree_node*)
../../gcc/gcc/cp/module.cc:7090
0x6deab8 trees_out::ref_node(tree_node*)
../../gcc/gcc/cp/module.cc:7073
0xa5dfdc trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:8978
0xa5fec9 trees_out::type_node(tree_node*)
../../gcc/gcc/cp/module.cc:8701
0xa5e3da trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9061
0xa5cbda trees_out::tree_node_vals(tree_node*)
../../gcc/gcc/cp/module.cc:7053
0xa5cbda trees_out::decl_value(tree_node*, depset*)
../../gcc/gcc/cp/module.cc:7640
0xa5d1ab trees_out::decl_node(tree_node*, walk_kind)
../../gcc/gcc/cp/module.cc:8549
0xa5e1a2 trees_out::tree_node(tree_node*)
../../gcc/gcc/cp/module.cc:9104
0xa5e66d trees_out::vec_chained_decls(tree_node*)
../../gcc/gcc/cp/module.cc:4879
0xa6255b trees_out::write_class_def(tree_node*)
../../gcc/gcc/cp/module.cc:11642
0xa6424c depset::hash::find_dependencies(module_state*)
../../gcc/gcc/cp/module.cc:13172
0xa64668 module_state::write(elf_out*, cpp_reader*)
../../gcc/gcc/cp/module.cc:17644
0xa65aff finish_module_processing(cpp_reader*)
../../gcc/gcc/cp/module.cc:19884
0x9f901b c_parse_final_cleanups()
../../gcc/gcc/cp/decl2.c:5175
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

g++ (GCC) 11.0.1 20210308 (experimental)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  1   2   >