public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "markmigm at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/106820] New: internal compiler error: in function_and_variable_visibility [for std::dynamic_pointer_cast use via <memory> module]
Date: Fri, 02 Sep 2022 20:48:39 +0000	[thread overview]
Message-ID: <bug-106820-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 106820
           Summary: internal compiler error: in
                    function_and_variable_visibility [for
                    std::dynamic_pointer_cast use via <memory> module]
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: markmigm at gmail dot com
  Target Milestone: ---

Failing command sequence (from a FreeBSD context) for a reduced/small test
case:

// g++12 -std=c++20 -fmodules-ts -xc++-system-header memory
// g++12 -std=c++20 -freport-bug -fmodules-ts -c
gpp12_module_dynamic_pointer_cast_failure.cpp

For:

# more /tmp/ccvYB09K.out
// Target: aarch64-portbld-freebsd14.0
// Configured with: /wrkdirs/usr/ports/lang/gcc12/work/gcc-12.2.0/configure
--disable-multilib --disable-bootstrap --disable-nls
--enable-gnu-indirect-function --enable-host-shared --enable-plugin
--libdir=/usr/local/lib/gcc12 --libexecdir=/usr/local/libexec/gcc12
--program-suffix=12 --with-as=/usr/local/bin/as --with-gmp=/usr/local
--with-gxx-include-dir=/usr/local/lib/gcc12/include/c++/
--with-gxx-libcxx-include-dir=/usr/include/c++/v1 --with-ld=/usr/local/bin/ld
--with-pkgversion='FreeBSD Ports Collection' --with-system-zlib --without-zstd
--enable-languages=c,c++,objc,fortran,jit --prefix=/usr/local
--localstatedir=/var --mandir=/usr/local/man
--infodir=/usr/local/share/info/gcc12 --build=aarch64-portbld-freebsd14.0
// Thread model: posix
// Supported LTO compression algorithms: zlib
// gcc version 12.2.0 (FreeBSD Ports Collection) 
// 
// during IPA pass: visibility
// gpp12_module_dynamic_pointer_cast_failure.cpp:21:1: internal compiler error:
in function_and_variable_visibility, at ipa-visibility.cc:716
//    21 | }
//       | ^
// Please submit a full bug report, with preprocessed source.
// See <https://gcc.gnu.org/bugs/> for instructions.

// /usr/local/libexec/gcc12/gcc/aarch64-portbld-freebsd14.0/12.2.0/cc1plus
-quiet gpp12_module_dynamic_pointer_cast_failure.cpp -quiet -dumpbase
gpp12_module_dynamic_pointer_cast_failure.cpp -dumpbase-ext .cpp
-mlittle-endian -mabi=lp64 -std=c++20 -freport-bug -fmodules-ts -o -
-frandom-seed=0 -fdump-noaddr

# 0 "gpp12_module_dynamic_pointer_cast_failure.cpp"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "gpp12_module_dynamic_pointer_cast_failure.cpp"
# 11 "gpp12_module_dynamic_pointer_cast_failure.cpp"
import  "/usr/local/lib/gcc12/include/c++/memory";

struct data
{
 virtual ~data() = default;
};

void test(std::shared_ptr<data> b)
{
 auto dpc = std::dynamic_pointer_cast<data>(b);
}

             reply	other threads:[~2022-09-02 20:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-02 20:48 markmigm at gmail dot com [this message]
2022-09-03 20:56 ` [Bug c++/106820] " markmigm at gmail dot com
2022-09-05  8:01 ` [Bug c++/106820] internal compiler error: in function_and_variable_visibility [for std::shared_ptr<data>{b,??} " markmigm at gmail dot com
2022-09-07 20:10 ` markmigm at gmail dot com
2022-09-07 20:43 ` markmigm at gmail dot com
2022-09-07 22:21 ` [Bug c++/106820] [modules] internal compiler error: in function_and_variable_visibility [for std::shared_ptr<data>{b,??} use via <memory> header unit]: mishandling of "weak" usage generated via __gthrw(pthread_mutex_unlock) use markmigm at gmail dot com
2022-10-12  9:34 ` redi at gcc dot gnu.org
2022-10-12  9:36 ` redi at gcc dot gnu.org
2022-10-12  9:44 ` redi at gcc dot gnu.org
2022-10-12 14:29 ` ppalka at gcc dot gnu.org
2024-04-14 16:50 ` [Bug c++/106820] [modules] ICE in function_and_variable_visibility with modules and weakref ppalka at gcc dot gnu.org
2024-04-30 17:06 ` ppalka at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-106820-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).