public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94835] New: ICE in vague_linkage_p, at cp/decl2.c:2041
@ 2020-04-28 23:17 casner at acm dot org
  2020-04-28 23:18 ` [Bug c++/94835] " casner at acm dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: casner at acm dot org @ 2020-04-28 23:17 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94835
           Summary: ICE in vague_linkage_p, at cp/decl2.c:2041
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: casner at acm dot org
  Target Milestone: ---

I am working on a pdp11-elf32 target in binutils with the goal of being able to
compile C++ for the PDP11 (an effort instigated by Paul Koning, gcc PDP11
maintainer).  I have a first implementation running, so now I am trying to
build g++ and libstdc++v3 to go with it.

I am attempting to build the gcc tree with newlib and libgloss symlinked in and
with the binutils components installed at the prefix and with gcc configured as
follows:

../configure --target=pdp11-elf32 --prefix=/usr/local --enable-languages=c,c++
--disable-libssp --disable-libgfortran --disable-libobjc --with-gmp=/opt/local/
--with-mpfr=/opt/local/ --with-mpc=/opt/local/
--with-libiconv-prefix=/opt/local --with-newlib

My host is running macOS 10.14.6.  gcc and g++ build successfully, but while
building libstdc++v3 I get:

.../libstdc++-v3/include/chrono:544:7: internal compiler error: in
vague_linkage_p, at cp/decl2.c:2041

This is with code freshly fetched with git today.
19667c82e479dc2bf8351588ed57aff90220b748

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

* [Bug c++/94835] ICE in vague_linkage_p, at cp/decl2.c:2041
  2020-04-28 23:17 [Bug c++/94835] New: ICE in vague_linkage_p, at cp/decl2.c:2041 casner at acm dot org
@ 2020-04-28 23:18 ` casner at acm dot org
  2020-04-28 23:27 ` casner at acm dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: casner at acm dot org @ 2020-04-28 23:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Stephen Casner <casner at acm dot org> ---
Created attachment 48398
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48398&action=edit
preprocessed source chrono.ii

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

* [Bug c++/94835] ICE in vague_linkage_p, at cp/decl2.c:2041
  2020-04-28 23:17 [Bug c++/94835] New: ICE in vague_linkage_p, at cp/decl2.c:2041 casner at acm dot org
  2020-04-28 23:18 ` [Bug c++/94835] " casner at acm dot org
@ 2020-04-28 23:27 ` casner at acm dot org
  2020-04-29 15:19 ` casner at acm dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: casner at acm dot org @ 2020-04-28 23:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Stephen Casner <casner at acm dot org> ---
Created attachment 48400
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48400&action=edit
log of compilation with -v

(Not sure why the initial attachment was deleted.)

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

* [Bug c++/94835] ICE in vague_linkage_p, at cp/decl2.c:2041
  2020-04-28 23:17 [Bug c++/94835] New: ICE in vague_linkage_p, at cp/decl2.c:2041 casner at acm dot org
  2020-04-28 23:18 ` [Bug c++/94835] " casner at acm dot org
  2020-04-28 23:27 ` casner at acm dot org
@ 2020-04-29 15:19 ` casner at acm dot org
  2020-04-30  4:46 ` casner at acm dot org
  2020-05-11 22:00 ` casner at acm dot org
  4 siblings, 0 replies; 6+ messages in thread
From: casner at acm dot org @ 2020-04-29 15:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Stephen Casner <casner at acm dot org> ---
I'm working with unmodified gcc sources, but if no other targets are seeing
this problem then it may be caused by pdp11-specific code somewhere else.  I
guess that g++ and libstdc++v3 have never been successfully built for pdp11.

Any suggestions for debugging this?  Perhaps backing off on some compiler
feature that might be tickling the bug?

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

* [Bug c++/94835] ICE in vague_linkage_p, at cp/decl2.c:2041
  2020-04-28 23:17 [Bug c++/94835] New: ICE in vague_linkage_p, at cp/decl2.c:2041 casner at acm dot org
                   ` (2 preceding siblings ...)
  2020-04-29 15:19 ` casner at acm dot org
@ 2020-04-30  4:46 ` casner at acm dot org
  2020-05-11 22:00 ` casner at acm dot org
  4 siblings, 0 replies; 6+ messages in thread
From: casner at acm dot org @ 2020-04-30  4:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Stephen Casner <casner at acm dot org> ---
I verified that the compilation of chrono:544 is the first time in the build
that the failing assert is executed, so that likely implies that the problem is
general and not specific to the particular source code.

The only mentions of COMDAT in the pdp11 backend are the macros

#define TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT hook_bool_void_false
#define TARGET_CXX_LIBRARY_RTTI_COMDAT hook_bool_void_false

These are in the direction that make the assert true rather than false, so
changing those to the default hook_bool_void_true wouldn't help (and would
presumably cause something else to fail).

I'm way out of my league here, so any suggestions would be appreciated.

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

* [Bug c++/94835] ICE in vague_linkage_p, at cp/decl2.c:2041
  2020-04-28 23:17 [Bug c++/94835] New: ICE in vague_linkage_p, at cp/decl2.c:2041 casner at acm dot org
                   ` (3 preceding siblings ...)
  2020-04-30  4:46 ` casner at acm dot org
@ 2020-05-11 22:00 ` casner at acm dot org
  4 siblings, 0 replies; 6+ messages in thread
From: casner at acm dot org @ 2020-05-11 22:00 UTC (permalink / raw)
  To: gcc-bugs

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

Stephen Casner <casner at acm dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |INVALID
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #5 from Stephen Casner <casner at acm dot org> ---
This ICE occurred because my additions to config.gcc were incomplete.  Those
additions did not include elfos.h for pdp11-elf32 so SUPPORTS_ONE_ONLY==0 and
TARGET_SUPPORTS_WEAK==0 which caused have_weak==false which caused
comdat_linkage() to set TREE_PUBLIC(decl)=0, resulting in the assert failure. 
This was probably not a supported configuration for compiling C++ code.

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

end of thread, other threads:[~2020-05-11 22:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-28 23:17 [Bug c++/94835] New: ICE in vague_linkage_p, at cp/decl2.c:2041 casner at acm dot org
2020-04-28 23:18 ` [Bug c++/94835] " casner at acm dot org
2020-04-28 23:27 ` casner at acm dot org
2020-04-29 15:19 ` casner at acm dot org
2020-04-30  4:46 ` casner at acm dot org
2020-05-11 22:00 ` casner at acm dot 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).