public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/116320] New: ICE: Segmentation fault (perform_or_defer_access_check)
@ 2024-08-10  5:45 iamanonymous.cs at gmail dot com
  2024-08-10  5:56 ` [Bug c++/116320] [12/13/14/15 Regression] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: iamanonymous.cs at gmail dot com @ 2024-08-10  5:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 116320
           Summary: ICE: Segmentation fault
                    (perform_or_defer_access_check)
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---
            Target: x86_64

*******************************************************************************
The compiler produces a segfault during perform_or_defer_access_check when
compiling the provided code with the specified options. 
The issue can also be reproduced on Compiler Explorer.

*******************************************************************************
OS and Platform:
# uname -a
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/gcc-set/gcc24-7-24/gccbin/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/gcc-set/gcc24-7-24/configure
--prefix=/home/gcc-set/gcc24-7-24/gccbin --enable-languages=c,c++,fortran,go
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240724 (experimental) (GCC) 
*******************************************************************************
Program: 
# cat 1.cpp
class   b{ };

template<class Type> class      c : public b{
    c<Type>*    A();
    static      c<Type>*        d;
};

template<class Type> c<Type>*   c<Type>::d;
template<class Type> c<Type>* c<Type>::A(){
    if  (d->b::State()) { } 
    return NULL;
}
*******************************************************************************
Command Lines:
# g++ 1.cpp -O3 -funroll-loops -fno-strict-aliasing -finline-functions
-fno-omit-frame-pointer -g3 -Wall -Wextra -Werror -Wconversion -Wformat
-Wmissing-declarations -Wshadow -Wstrict-prototypes -c 
cc1plus: error: command-line option ‘-Wstrict-prototypes’ is valid for C/ObjC
but not for C++ [-Werror]
1.cpp: In member function ‘c<Type>* c<Type>::A()’:
1.cpp:10:13: internal compiler error: Segmentation fault
   10 |     if  (d->b::State()) { }
      |             ^
0x27f432e internal_error(char const*, ...)
        /home/gcc-set/gcc24-7-24/gcc/diagnostic-global-context.cc:491
0x1412bf6 crash_signal
        /home/gcc-set/gcc24-7-24/gcc/toplev.cc:319
0xd2c40e perform_or_defer_access_check(tree_node*, tree_node*, tree_node*, int,
access_failure_info*)
        /home/gcc-set/gcc24-7-24/gcc/cp/semantics.cc:489
0xc5e95d cp_parser_lookup_name
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:32367
0xc9ab27 cp_parser_class_name
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:26826
0xc946f0 cp_parser_qualifying_entity
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:7422
0xc946f0 cp_parser_nested_name_specifier_opt
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:7104
0xc97969 cp_parser_id_expression
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:6447
0xc9c6a9 cp_parser_postfix_dot_deref_expression
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:8684
0xc92051 cp_parser_postfix_expression
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:8221
0xc677d1 cp_parser_binary_expression
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:10415
0xc685a5 cp_parser_assignment_expression
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:10759
0xc68ae4 cp_parser_expression
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:10926
0xca6dac cp_parser_condition
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:14062
0xcb0376 cp_parser_selection_statement
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:13694
0xc76dba cp_parser_statement
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:12743
0xc79f8f cp_parser_statement_seq_opt
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:13451
0xc7a20f cp_parser_compound_statement
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:13298
0xca2585 cp_parser_function_body
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:26175
0xca2585 cp_parser_ctor_initializer_opt_and_function_body
        /home/gcc-set/gcc24-7-24/gcc/cp/parser.cc:26226
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.


*******************************************************************************

Also ICE on trunk, compiler explorer:https://godbolt.org/z/9jns9j8hz

*******************************************************************************

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

end of thread, other threads:[~2024-09-09  0:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-10  5:45 [Bug c++/116320] New: ICE: Segmentation fault (perform_or_defer_access_check) iamanonymous.cs at gmail dot com
2024-08-10  5:56 ` [Bug c++/116320] [12/13/14/15 Regression] " pinskia at gcc dot gnu.org
2024-08-10  5:58 ` pinskia at gcc dot gnu.org
2024-08-13 13:23 ` [Bug c++/116320] [12/13/14/15 Regression] ICE: Segmentation fault (perform_or_defer_access_check) since r11-1350 ppalka at gcc dot gnu.org
2024-08-15 14:26 ` cvs-commit at gcc dot gnu.org
2024-09-09  0:04 ` [Bug c++/116320] [12/13/14 " cvs-commit at gcc dot gnu.org
2024-09-09  0:06 ` [Bug c++/116320] [12/13 " 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).