/usr/local/4.2/bin/g++4.2.0 -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.2-svn/configure --enable-languages=c,c++
--prefix=/usr/local/4.2 --program-suffix=4.2.0
Thread model: posix
gcc version 4.2.0 20060523 (experimental)

Revision: 114016

/usr/local/4.2/libexec/gcc/i686-pc-linux-gnu/4.2.0/cc1plus -quiet -v
-I/home/doerfler/ltilib-2/42/linux -I../src/basics -I../src/types -I../src/math
-I../src/imgProc -I../src/ioBasics -I../src/io -I../src/draw -I../src/viewer
-I../src/system -I../src/classifiers -Iworkbench -I../tester
-I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include
-I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0
-I/opt/gnome/lib/gtk-2.0/include -I/opt/gnome/include/atk-1.0
-I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0
-I/opt/gnome/lib/glib-2.0/include -D_GNU_SOURCE -D_REENTRANT -D_BSD_SOURCE
-D_XOPEN_SOURCE=500 -D_REENTRANT -DNDEBUG -D_USE_FIRE_WIRE_DCAM
../src/imgProc/ltiLocalColorDescriptorExtractor.cpp -quiet -dumpbase
ltiLocalColorDescriptorExtractor.cpp -march=pentium-m -msse -msse2 -ansi
-auxbase-strip ../obj/release/ltiLocalColorDescriptorExtractor.o -O3 -Wundef
-Wwrite-strings -Wall -ansi -version -ftree-vectorize
-ftree-vectorizer-verbose=5 -fpic -o /tmp/ccrEtWY9.s

...
../src/imgProc/ltiGridSampling_template.h:227: note: vectorized 0 loops in
function.
../src/imgProc/ltiSliceSampling_template.h: In function ‘void __tcf_15(void*)’:
../src/imgProc/ltiSliceSampling_template.h:82: 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.

Unfortunately, if I use -save-temps the ICE does not occur.
It also goes away without -ftree-vectorizer-verbose

Here is what gdb tells me:

Program received signal SIGSEGV, Segmentation fault.
0x40099d9b in strlen () from /lib/tls/libc.so.6
(gdb) bt
#0  0x40099d9b in strlen () from /lib/tls/libc.so.6
#1  0x4006e3d8 in vfprintf () from /lib/tls/libc.so.6
#2  0x08694581 in __FUNCTION__.28397 ()
#3  0x00000001 in ?? ()
#4  0x4072a1b8 in ?? ()
#5  0x00000000 in ?? ()
#6  0x4060a898 in ?? ()
#7  0x0813df36 in gt_ggc_mx_lang_tree_node (x_p=0x0) at gt-cp-tree.h:89
#8  0x0813df36 in gt_ggc_mx_lang_tree_node (x_p=0x40494b2c) at gt-cp-tree.h:89
#9  0x00000000 in ?? ()
#10 0x00000002 in ?? ()
#11 0x00000000 in ?? ()
#12 0x00000000 in ?? ()
#13 0x0813df36 in gt_ggc_mx_lang_tree_node (x_p=0x8694582) at gt-cp-tree.h:89
#14 0xffffffff in ?? ()
(gdb) cont
Continuing.
../src/imgProc/ltiSliceSampling_template.h: In function ‘void __tcf_15(void*)’:
../src/imgProc/ltiSliceSampling_template.h:82: internal compiler error:
Segmentation fault

The source this happens on is a large library (ltilib-2). Here's a snippet

-----------------------------------------
  template <class Acc>
  bool sliceSampling::apply(Acc& acc,
                            const matrix<typename Acc::value_type>& img,
                            const location& loc,
                            dvector& destv) {

    const parameters& par = getParameters();
    // interpolation
    static const bilinearInterpolation<typename Acc::value_type> bilin;

    //create accumulators
    static std::vector<Acc> accuVec;
---------------------------------------------

the last line is the one reported as causing the ICE.
Acc is a template struct with a few member functions and a C array.

When compiled without -ftree-vectorizer-verbose __tcf_15 looks like this:
------------------------------------------------------------------
        .align 2
        .p2align 4,,15
        .type   __tcf_15, @function
__tcf_15:
.LFB3101:
        pushl   %ebp
.LCFI428:
        movl    %esp, %ebp
.LCFI429:
        pushl   %ebx
.LCFI430:
        call    __i686.get_pc_thunk.bx
        addl    $_GLOBAL_OFFSET_TABLE_, %ebx
        subl    $4, %esp
.LCFI431:
        movl   
[EMAIL PROTECTED](%ebx)
, %eax
        movl    (%eax), %eax
        testl   %eax, %eax
        je      .L1085
        movl    %eax, (%esp)
        call    [EMAIL PROTECTED]
.L1085:
        popl    %eax
        popl    %ebx
        popl    %ebp
        ret
.LFE3101:
        .size   __tcf_15, .-__tcf_15
--------------------------------------------------------------------

I can post instructions for downloading and reproduction of the ICE if this is
desired. 

I can also perform further analysis if somebody can give instructions what else
I can do.


-- 
           Summary: ICE with -ftree-vectorizer-verbose
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc at pdoerfler dot com
  GCC host triplet: i686-pc-linux-gnu


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

Reply via email to