public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98462] New: ICE when making iomanip module and all modules after it
@ 2020-12-28 13:53 patrick.kox at commandoregel dot be
  2021-01-05 13:37 ` [Bug c++/98462] " nathan at gcc dot gnu.org
  2024-03-13 13:29 ` [Bug c++/98462] [modules] " ppalka at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: patrick.kox at commandoregel dot be @ 2020-12-28 13:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98462

            Bug ID: 98462
           Summary: ICE when making iomanip module and all modules after
                    it
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick.kox at commandoregel dot be
  Target Milestone: ---

With the previous snapshot of gcc-11-20201220 the following command failed: g++
-fmodules-ts -std=c++20 -c -x c++-system-header iostream.

This is solved by the current version (gcc-11-20201227) but now running this
command on iomanip fails. And when it does, iostream (and other also fail).

So for example when I do it in the following order only iomanip fails:
g++ -fmodules-ts -std=c++20 -c -x c++-system-header cmath
g++ -fmodules-ts -std=c++20 -c -x c++-system-header cwchar
g++ -fmodules-ts -std=c++20 -c -x c++-system-header iostream
g++ -fmodules-ts -std=c++20 -c -x c++-system-header string
g++ -fmodules-ts -std=c++20 -c -x c++-system-header string_view
g++ -fmodules-ts -std=c++20 -c -x c++-system-header iomanip

but when I execute the command with iomanip before the others they also fail
and deleting the entire gcm.cache directory seems to solve this.

The output of the error message is:
$ Modules $ g++ -fmodules-ts -std=c++20 -c -x c++-system-header iomanip 
In file included from /opt/gcc-11/include/c++/11.0.0/bits/functexcept.h:40,
                 from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:60,
                 from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
                 from /opt/gcc-11/include/c++/11.0.0/string:40,
of module /opt/gcc-11/include/c++/11.0.0/string, imported at
/opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
        included from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
                 from /opt/gcc-11/include/c++/11.0.0/iomanip:40:
/opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:461:11: internal compiler
error: in duplicate_decls, at cp/decl.c:2022
  461 |           __catch(...)
      |           ^~~~~~~
0x66a2ba duplicate_decls(tree_node*, tree_node*, bool, bool)
        ../../gcc/cp/decl.c:2022
0xa38d2e check_module_override
        ../../gcc/cp/name-lookup.c:3651
0xa38d2e do_pushdecl
        ../../gcc/cp/name-lookup.c:3774
0xa39a21 do_pushdecl
        ../../gcc/cp/name-lookup.c:4881
0xa39a21 do_pushdecl_with_scope
        ../../gcc/cp/name-lookup.c:4881
0xa39c85 pushdecl_namespace_level(tree_node*, bool)
        ../../gcc/cp/name-lookup.c:6245
0xa3ae94 pushdecl_top_level(tree_node*)
        ../../gcc/cp/name-lookup.c:8717
0x9bce22 declare_library_fn
        ../../gcc/cp/except.c:172
0x9bda0d do_end_catch
        ../../gcc/cp/except.c:254
0x9bda0d push_eh_cleanup
        ../../gcc/cp/except.c:270
0x9bda0d expand_start_catch_block(tree_node*)
        ../../gcc/cp/except.c:408
0xaf66d4 finish_handler_parms(tree_node*, tree_node*)
        ../../gcc/cp/semantics.c:1492
0xa7e443 cp_parser_handler
        ../../gcc/cp/parser.c:27086
0xa5ece7 cp_parser_handler_seq
        ../../gcc/cp/parser.c:27061
0xa5ece7 cp_parser_try_block
        ../../gcc/cp/parser.c:27015
0xa5ece7 cp_parser_statement
        ../../gcc/cp/parser.c:11654
0xa5ff9d cp_parser_statement_seq_opt
        ../../gcc/cp/parser.c:12112
0xa60078 cp_parser_compound_statement
        ../../gcc/cp/parser.c:12062
0xa7fe6d cp_parser_implicitly_scoped_statement
        ../../gcc/cp/parser.c:13577
0xa5f754 cp_parser_selection_statement
        ../../gcc/cp/parser.c:12293
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

and this is the error I get when I (for example) execute the command with
iostream:
$ Modules $ g++ -fmodules-ts -std=c++20 -c -x c++-system-header iostream
In file included from /opt/gcc-11/include/c++/11.0.0/bits/functexcept.h:40,
                 from /opt/gcc-11/include/c++/11.0.0/bits/stl_algobase.h:60,
                 from /opt/gcc-11/include/c++/11.0.0/bits/char_traits.h:39,
                 from /opt/gcc-11/include/c++/11.0.0/string:40,
of module /opt/gcc-11/include/c++/11.0.0/string, imported at
/opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:40,
        included from /opt/gcc-11/include/c++/11.0.0/bits/ios_base.h:41,
                 from /opt/gcc-11/include/c++/11.0.0/ios:42,
                 from /opt/gcc-11/include/c++/11.0.0/ostream:38,
                 from /opt/gcc-11/include/c++/11.0.0/iostream:39:
/opt/gcc-11/include/c++/11.0.0/bits/locale_classes.h:461:11: internal compiler
error: in duplicate_decls, at cp/decl.c:2022
  461 |           __catch(...)
      |           ^~~~~~~
0x66a2ba duplicate_decls(tree_node*, tree_node*, bool, bool)
        ../../gcc/cp/decl.c:2022
0xa38d2e check_module_override
        ../../gcc/cp/name-lookup.c:3651
0xa38d2e do_pushdecl
        ../../gcc/cp/name-lookup.c:3774
0xa39a21 do_pushdecl
        ../../gcc/cp/name-lookup.c:4881
0xa39a21 do_pushdecl_with_scope
        ../../gcc/cp/name-lookup.c:4881
0xa39c85 pushdecl_namespace_level(tree_node*, bool)
        ../../gcc/cp/name-lookup.c:6245
0xa3ae94 pushdecl_top_level(tree_node*)
        ../../gcc/cp/name-lookup.c:8717
0x9bce22 declare_library_fn
        ../../gcc/cp/except.c:172
0x9bda0d do_end_catch
        ../../gcc/cp/except.c:254
0x9bda0d push_eh_cleanup
        ../../gcc/cp/except.c:270
0x9bda0d expand_start_catch_block(tree_node*)
        ../../gcc/cp/except.c:408
0xaf66d4 finish_handler_parms(tree_node*, tree_node*)
        ../../gcc/cp/semantics.c:1492
0xa7e443 cp_parser_handler
        ../../gcc/cp/parser.c:27086
0xa5ece7 cp_parser_handler_seq
        ../../gcc/cp/parser.c:27061
0xa5ece7 cp_parser_try_block
        ../../gcc/cp/parser.c:27015
0xa5ece7 cp_parser_statement
        ../../gcc/cp/parser.c:11654
0xa5ff9d cp_parser_statement_seq_opt
        ../../gcc/cp/parser.c:12112
0xa60078 cp_parser_compound_statement
        ../../gcc/cp/parser.c:12062
0xa7fe6d cp_parser_implicitly_scoped_statement
        ../../gcc/cp/parser.c:13577
0xa5f754 cp_parser_selection_statement
        ../../gcc/cp/parser.c:12293
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/98462] ICE when making iomanip module and all modules after it
  2020-12-28 13:53 [Bug c++/98462] New: ICE when making iomanip module and all modules after it patrick.kox at commandoregel dot be
@ 2021-01-05 13:37 ` nathan at gcc dot gnu.org
  2024-03-13 13:29 ` [Bug c++/98462] [modules] " ppalka at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-01-05 13:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98462

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |nathan at gcc dot gnu.org
   Last reconfirmed|                            |2021-01-05

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug c++/98462] [modules] ICE when making iomanip module and all modules after it
  2020-12-28 13:53 [Bug c++/98462] New: ICE when making iomanip module and all modules after it patrick.kox at commandoregel dot be
  2021-01-05 13:37 ` [Bug c++/98462] " nathan at gcc dot gnu.org
@ 2024-03-13 13:29 ` ppalka at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-03-13 13:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98462

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Seems fixed even in GCC 11.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-13 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-28 13:53 [Bug c++/98462] New: ICE when making iomanip module and all modules after it patrick.kox at commandoregel dot be
2021-01-05 13:37 ` [Bug c++/98462] " nathan at gcc dot gnu.org
2024-03-13 13:29 ` [Bug c++/98462] [modules] " ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).