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

            Bug ID: 69411
           Summary: ICE on invalid code
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bernd.edlinger at hotmail dot de
  Target Milestone: ---

Created attachment 37416
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37416&action=edit
reduced test case

Hi,

the attached small.cc creates an ICE when compiled with -fsanitize=undefined
initially the ICE was triggered by a single error in > 100.000 lines C++ code.

gcc -c -fsanitize=undefined small.cc
small.cc:2:3: error: expected '{' before 'inline'
   inline namespace __cxx11 __attribute__((__abi_tag__ ("cxx11"))) { }
   ^~~~~~
[...]
small.cc:151:1: error: expected '}' at end of input
small.cc:126:12: warning: inline function 'T*
std::TB5Util::SOCmnPointer<T>::p() const [with T =
std::TB5Util::OTClientSession]' used but never defined
  inline T* p() const;
            ^

small.cc:134:24: warning: inline function 'const tstring&
std::TB5Util::OTClientSession::getUrl() const' used but never defined
  inline const tstring& getUrl() const;
                        ^~~~~~

small.cc: In member function 'std::TB5Util::EnumStatusCode
std::TB5Util::SecureChannel::removeSession(std::TB5Util::OTClientSessionPtr,
bool)':
small.cc:150:121: internal compiler error: tree check: expected class 'type',
have 'exceptional' (error_mark) in create_tmp_from_val, at gimplify.c:497
   messageStream << "Secure channel: " << this << "(" << m_channelHandle << ")
remove session " << session->getName() << " (" << session.p() << ") to " <<
session->getUrl();
                                                                               
                                         ^~~~

0xf86f27 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc-6-20160110/gcc/tree.c:9654
0xace87f tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        ../../gcc-6-20160110/gcc/tree.h:3121
0xace87f create_tmp_from_val
        ../../gcc-6-20160110/gcc/gimplify.c:497
0xace87f lookup_tmp_var
        ../../gcc-6-20160110/gcc/gimplify.c:533
0xace87f internal_get_tmp_var
        ../../gcc-6-20160110/gcc/gimplify.c:563
0xac6652 get_initialized_tmp_var(tree_node*, gimple**, gimple**)
        ../../gcc-6-20160110/gcc/gimplify.c:600
0xac6652 gimplify_save_expr
        ../../gcc-6-20160110/gcc/gimplify.c:4977
0xac6652 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-6-20160110/gcc/gimplify.c:10402
0xad737a gimplify_call_expr
        ../../gcc-6-20160110/gcc/gimplify.c:2361
0xac6ac1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-6-20160110/gcc/gimplify.c:10085
0xacb756 gimplify_stmt(tree_node**, gimple**)
        ../../gcc-6-20160110/gcc/gimplify.c:5616
0xacc361 gimplify_compound_expr
        ../../gcc-6-20160110/gcc/gimplify.c:4932
0xac724c gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-6-20160110/gcc/gimplify.c:10103
0xad6c9b gimplify_call_expr
        ../../gcc-6-20160110/gcc/gimplify.c:2528
0xac6ac1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-6-20160110/gcc/gimplify.c:10085
0xace24c internal_get_tmp_var
        ../../gcc-6-20160110/gcc/gimplify.c:557
0xac6652 get_initialized_tmp_var(tree_node*, gimple**, gimple**)
        ../../gcc-6-20160110/gcc/gimplify.c:600
0xac6652 gimplify_save_expr
        ../../gcc-6-20160110/gcc/gimplify.c:4977
0xac6652 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc-6-20160110/gcc/gimplify.c:10402
0xad737a gimplify_call_expr
        ../../gcc-6-20160110/gcc/gimplify.c:2361
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to