This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/23117] New: ICE on valid code while building libgcc


The latest compiler build from CVS sources on 07-28-2005 segfaults while
building libgcc for arm-softfloat target with -O2,O2,Os opt levels. The error
does not happen when -O1 is used

The program compiles fine when I use my host compiler which is gcc version 4.0.1
20050727 (Red Hat 4.0.1-5)

error log
================================

 __do_global_ctors_aux
Analyzing compilation unitPerforming intraprocedural optimizations
Assembling functions:
 __do_global_ctors_aux
/home/kraj/a.c: In function '__do_global_ctors_aux':
/home/kraj/a.c:8: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

====================================

How to reporoduce

gcc -O2 -c testcase.c

testcase.c
====================================
typedef void (*func_ptr) (void);

static func_ptr __CTOR_END__[1] = {(func_ptr) 0 };

static void  __attribute__((used))  __do_global_ctors_aux (void)
{
  func_ptr *p;
  for (p = __CTOR_END__ - 1; *p != (func_ptr) -1; p--)
    (*p) ();
}

=======================================================

-- 
           Summary: ICE on valid code while building libgcc
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: raj dot khem at gmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i686-host_pc-linux-gnu
GCC target triplet: arm-softfloat-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23117


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]