Bug ID: 77674
           Summary: ICE in binds_to_current_def_p with
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot
          Reporter: bernds at gcc dot
  Target Milestone: ---


typedef struct { } __fsid_t;
typedef unsigned long int pthread_t;
extern "C" {
  extern __inline __attribute__ ((__gnu_inline__)) int pthread_equal (pthread_t
__thread1, pthread_t __thread2) throw ()   {
typedef pthread_t __gthread_t;
static __typeof (pthread_equal)      __gthrw_pthread_equal __attribute__
((__weakref__ ("pthread_equal")));

static inline int __gthread_equal (__gthread_t __t1, __gthread_t __t2)
  return __gthrw_pthread_equal (__t1, __t2);

Command line (with a normal x86_64-linux compiler):
./cc1plus red4.ii -fpreprocessed -O2 -fkeep-inline-functions -quiet

And the crash:
_ZL21__gthrw_pthread_equalmm/1 (int __gthrw_pthread_equal(pthread_t,
pthread_t)) @0x7f30053f8170
  Type: function definition analyzed alias transparent_alias weakref
  Visibility: weak
  References: pthread_equal/0 (alias)
  Availability: available
  First run: 0
  Function flags: process
  Called by: _ZL15__gthread_equalmm/2 (1.00 per call) 
red4.ii: In function ‘int pthread_equal(pthread_t, pthread_t)’:
red4.ii:13:1: internal compiler error: in binds_to_current_def_p, at
0xa5e668 symtab_node::binds_to_current_def_p(symtab_node*)
0xa67d59 set_const_flag_1
0xa67c6c set_const_flag_1
0xa67fdf cgraph_node::set_const_flag(bool, bool)
0x15d05e1 execute
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <> for instructions.

Reply via email to