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



             Bug #: 55709

           Summary: [4.8 Regression] Infinite loop in pointer_set_insert

                    compiling cp/pt.c

    Classification: Unclassified

           Product: gcc

           Version: 4.8.0

            Status: UNCONFIRMED

          Severity: normal

          Priority: P3

         Component: middle-end

        AssignedTo: unassig...@gcc.gnu.org

        ReportedBy: dang...@gcc.gnu.org

                CC: ja...@gcc.gnu.org, ste...@gcc.gnu.org

              Host: hppa-unknown-linux-gnu

            Target: hppa-unknown-linux-gnu

             Build: hppa-unknown-linux-gnu





Created attachment 28978

  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28978

Compressed preprocessed sourcce



Hang occurs in stage2 here:



/home/dave/gnu/gcc/objdir/./prev-gcc/xg++

-B/home/dave/gnu/gcc/objdir/./prev-gcc/

-B/home/dave/opt/gnu/gcc/gcc-4.8/hppa-linux-gnu/bin/ -nostdinc++

-B/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/src/.libs

-B/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/.libs

-I/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/include/hppa-linux-gnu

-I/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/include

-I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++

-L/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/src/.libs

-L/home/dave/gnu/gcc/objdir/prev-hppa-linux-gnu/libstdc++-v3/libsupc++/.libs -c

 -DIN_GCC_FRONTEND -DIN_GCC_FRONTEND -g -O2 -DIN_GCC   -fno-exceptions

-fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings

-Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long

-Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common 

-DHAVE_CONFIG_H -I. -Icp -I../../gcc/gcc -I../../gcc/gcc/cp

-I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include 

-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd

-I../libdecnumber -I../../gcc/gcc/../libbacktrace    ../../gcc/gcc/cp/pt.c -o

cp/pt.o



(gdb) bt

#0  0x006a88a4 in insert_aux (log_slots=1, n_slots=4096, slots=0x15659c0, 

    p=0x3b579) at ../../gcc/gcc/pointer-set.c:123

#1  pointer_set_insert (pset=0xe06f20, p=0x4309cf80)

    at ../../gcc/gcc/pointer-set.c:153

#2  0x009d3dcc in assemble_external (decl=0x4309cf80)

    at ../../gcc/gcc/varasm.c:2199

#3  0x004e0608 in output_addr_const (file=0xe05a20, x=0x4421d090)

    at ../../gcc/gcc/final.c:3701

#4  0x009eb3ac in pa_assemble_integer (x=0x4421d090, size=<optimized out>, 

    aligned_p=1) at ../../gcc/gcc/config/pa/pa.c:3221

#5  0x009d476c in assemble_integer (x=0x4421d090, size=4, align=32, force=1)

    at ../../gcc/gcc/varasm.c:2496

#6  0x009eb208 in output_deferred_plabels ()

    at ../../gcc/gcc/config/pa/pa.c:5611

#7  0x0076b588 in compile_file () at ../../gcc/gcc/toplev.c:670

#8  0x0076d4ec in do_compile () at ../../gcc/gcc/toplev.c:1878

#9  toplev_main (argc=73, argv=0xfc1c002c) at ../../gcc/gcc/toplev.c:1954

#10 0x00b32bdc in main (argc=<optimized out>, argv=<optimized out>)

    at ../../gcc/gcc/main.c:36



This was introduced by:



2012-12-12  Steven Bosscher  <ste...@gcc.gnu.org>

            Jakub Jelinek  <ja...@redhat.com>



        PR middle-end/52640

        * varasm.c (pending_assemble_externals_set): New pointer set.

        (process_pending_assemble_externals): Destroy the pointer set.

        (assemble_external): See if decl is in pending_assemble_externals_set,

        and add it to pending_assemble_externals if necessary.

        (init_varasm_once): Allocate pending_assemble_externals_set.



Think pending_assemble_externals_set has been destroyed when this happens.



This came up before which was why the above change wasn't installed on trunk.

See PR middle-end/52894.  Thought Steven was going to try to come up with

something better for trunk.



cc1plus options:

-fpreprocessed pt.ii -quiet -dumpbase pt.c -auxbase-strip cp/pt.o -g -O2

-Wextra -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual

-Wsuggest-attribute=format -Wpedantic -Wno-long-long -Wno-variadic-macros

-Wno-overlength-strings -Werror -version -fno-exceptions -fno-rtti

-fasynchronous-unwind-tables -fno-common -o pt.s

Reply via email to