public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98707] New: ICE using std::string in a module partition
@ 2021-01-16 23:24 practicaldesignbook at gmail dot com
  2021-01-18  8:37 ` [Bug c++/98707] " marxin at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: practicaldesignbook at gmail dot com @ 2021-01-16 23:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98707
           Summary: ICE using std::string in a module partition
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: practicaldesignbook at gmail dot com
  Target Milestone: ---

Created attachment 49983
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49983&action=edit
Input files A.cpp and Test.cpp to trigger bug along with associated
preprocessed files

gcc version: gcc version 11.0.0 20210116 (experimental)
target: x86_64-pc-linux-gnu
build options: -disable-multilib --enable-languages=c,c++,fortran,lto,objc
--no-create --no-recursion

g++ produces an internal compiler error when combining strings and module
partitions (code attached). The error is not produced if the constructor of A
is changed from a std::string to an int or if the code is written without a
module partition.

g++ -std=c++20 -fmodules-ts -c -save-temps A.cpp Test.cpp
Test.cpp:1:9: internal compiler error: in insert, at cp/module.cc:4888
    1 | export module Test;
      |         ^~~~~~
0x699623 trees_out::insert(tree_node*, walk_kind)
        ../.././gcc/cp/module.cc:4888
0xa119ee trees_out::add_indirects(tree_node*)
        ../.././gcc/cp/module.cc:7303
0xa14e50 trees_out::decl_node(tree_node*, walk_kind)
        ../.././gcc/cp/module.cc:8647
0xa15a42 trees_out::tree_node(tree_node*)
        ../.././gcc/cp/module.cc:9149
0xa15f0d trees_out::vec_chained_decls(tree_node*)
        ../.././gcc/cp/module.cc:4976
0xa19e1b trees_out::write_class_def(tree_node*)
        ../.././gcc/cp/module.cc:11712
0xa1baec depset::hash::find_dependencies()
        ../.././gcc/cp/module.cc:13202
0xa1bec4 module_state::write(elf_out*, cpp_reader*)
        ../.././gcc/cp/module.cc:17568
0xa1d19c finish_module_processing(cpp_reader*)
        ../.././gcc/cp/module.cc:19747
0x9b164b c_parse_final_cleanups()
        ../.././gcc/cp/decl2.c:5178
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] 4+ messages in thread

* [Bug c++/98707] ICE using std::string in a module partition
  2021-01-16 23:24 [Bug c++/98707] New: ICE using std::string in a module partition practicaldesignbook at gmail dot com
@ 2021-01-18  8:37 ` marxin at gcc dot gnu.org
  2021-02-24  0:37 ` practicaldesignbook at gmail dot com
  2021-02-24 13:20 ` nathan at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-18  8:37 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |nathan at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-01-18

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

* [Bug c++/98707] ICE using std::string in a module partition
  2021-01-16 23:24 [Bug c++/98707] New: ICE using std::string in a module partition practicaldesignbook at gmail dot com
  2021-01-18  8:37 ` [Bug c++/98707] " marxin at gcc dot gnu.org
@ 2021-02-24  0:37 ` practicaldesignbook at gmail dot com
  2021-02-24 13:20 ` nathan at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: practicaldesignbook at gmail dot com @ 2021-02-24  0:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Adam Singer <practicaldesignbook at gmail dot com> ---
The build from February 23, 2021, gcc version 11.0.0 20210223 (experimental), 
fixes this bug.

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

* [Bug c++/98707] ICE using std::string in a module partition
  2021-01-16 23:24 [Bug c++/98707] New: ICE using std::string in a module partition practicaldesignbook at gmail dot com
  2021-01-18  8:37 ` [Bug c++/98707] " marxin at gcc dot gnu.org
  2021-02-24  0:37 ` practicaldesignbook at gmail dot com
@ 2021-02-24 13:20 ` nathan at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-02-24 13:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
thanks for the update, closing

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

end of thread, other threads:[~2021-02-24 13:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-16 23:24 [Bug c++/98707] New: ICE using std::string in a module partition practicaldesignbook at gmail dot com
2021-01-18  8:37 ` [Bug c++/98707] " marxin at gcc dot gnu.org
2021-02-24  0:37 ` practicaldesignbook at gmail dot com
2021-02-24 13:20 ` nathan 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).