public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
@ 2012-04-06 21:22 danglin at gcc dot gnu.org
  2012-04-06 21:28 ` [Bug middle-end/52894] " dave.anglin at bell dot net
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-04-06 21:22 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52894
           Summary: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails
                    with gcc-4.6.3: Infinite loop in pointer_set_insert
    Classification: Unclassified
           Product: gcc
           Version: 4.6.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: danglin@gcc.gnu.org
              Host: hppa-unknown-linux-gnu
            Target: hppa-unknown-linux-gnu
             Build: hppa-unknown-linux-gnu


Bootstrap fails with Debian gcc-4.6.3-2 and gcc-4.7.0-2.  The failure
was most likely caused by r185758 based on backtrace:

    PR middle-end/52640
    * varasm.c: Include pointer-set.h.
    (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.

gcc-4.6.3-1 and gcc-4.7.0-1 were ok.

The cause of the loop is as yet unclear but it is clearly not associated
with the above change.  The failure occurs compiling a number of files in
stage1.  It seems to be associated with the second vector allocation
in pointer_set_insert.

Triggered with the following options:

-fpreprocessed cgraphbuild.i -quiet -dumpbase cgraphbuild.c -auxbase-strip
cgraphbuild.o -g -Wextra -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-Wold-style-definition -Wc++-compat -version -fkeep-inline-functions
-fno-common -o cgraphbuild.s


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
@ 2012-04-06 21:28 ` dave.anglin at bell dot net
  2012-04-06 21:41 ` danglin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dave.anglin at bell dot net @ 2012-04-06 21:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from dave.anglin at bell dot net 2012-04-06 21:27:47 UTC ---
.i.

--
John David Anglin    dave.anglin@bell.net


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
  2012-04-06 21:28 ` [Bug middle-end/52894] " dave.anglin at bell dot net
@ 2012-04-06 21:41 ` danglin at gcc dot gnu.org
  2012-04-06 22:43 ` danglin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-04-06 21:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from John David Anglin <danglin at gcc dot gnu.org> 2012-04-06 21:41:40 UTC ---
Created attachment 27107
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27107
Preprocessed source


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
  2012-04-06 21:28 ` [Bug middle-end/52894] " dave.anglin at bell dot net
  2012-04-06 21:41 ` danglin at gcc dot gnu.org
@ 2012-04-06 22:43 ` danglin at gcc dot gnu.org
  2012-04-07  1:40 ` danglin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-04-06 22:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> 2012-04-06 22:43:09 UTC ---
cc1 is stuck in this loop in insert_aux:

  while (true)
    {
      if (slots[n] == p || slots[n] == 0)
        return n;
      else
        {
          ++n;
          if (n == n_slots)
            n = 0;
        }
    }

Fails even when pointer-set.c is compiled at -O0.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-04-06 22:43 ` danglin at gcc dot gnu.org
@ 2012-04-07  1:40 ` danglin at gcc dot gnu.org
  2012-04-07 19:10 ` danglin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-04-07  1:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from John David Anglin <danglin at gcc dot gnu.org> 2012-04-07 01:40:20 UTC ---
(gdb) p *pset
$54 = {log_slots = 0, n_slots = 512, n_elements = 117, slots = 0x496c990}
(gdb) bt
#0  pointer_set_insert (pset=0x488ef70, p=0x40424300)
    at ../../gcc/gcc/pointer-set.c:143
#1  0x0338d004 in assemble_external (decl=0x40424300)
    at ../../gcc/gcc/varasm.c:2204
#2  0x00c7ebb0 in output_addr_const (file=0x4862ac0, x=0x4168c030)
    at ../../gcc/gcc/final.c:3568
#3  0x03425700 in pa_assemble_integer (x=0x4168c030, size=4, aligned_p=1)
    at ../../gcc/gcc/config/pa/pa.c:3192
#4  0x0338df20 in assemble_integer (x=0x4168c030, size=4, align=32, force=1)
    at ../../gcc/gcc/varasm.c:2502
#5  0x0342c100 in output_deferred_plabels ()
    at ../../gcc/gcc/config/pa/pa.c:5561
#6  0x01dbb10c in compile_file () at ../../gcc/gcc/toplev.c:681
#7  0x01dbfe3c in do_compile () at ../../gcc/gcc/toplev.c:1938
#8  0x01dc02bc in toplev_main (argc=1087218560, argv=0x4056f70)
    at ../../gcc/gcc/toplev.c:2014
#9  0x01dc02bc in toplev_main (argc=28, argv=0xfdf02024)
    at ../../gcc/gcc/toplev.c:2014
#10 0x00415c48 in main (argc=28, argv=0xfdf02024) at ../../gcc/gcc/main.c:36

The PA backend calls assemble_external via the TARGET_ASM_FILE_END
hook at the end of the compilation (i.e., after pset has been destroyed).


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-04-07  1:40 ` danglin at gcc dot gnu.org
@ 2012-04-07 19:10 ` danglin at gcc dot gnu.org
  2012-04-10 12:08 ` [Bug middle-end/52894] [4.5,4.6,4.7 " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-04-07 19:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from John David Anglin <danglin at gcc dot gnu.org> 2012-04-07 19:09:56 UTC ---
Created attachment 27112
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27112
Patch


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-04-07 19:10 ` danglin at gcc dot gnu.org
@ 2012-04-10 12:08 ` rguenth at gcc dot gnu.org
  2012-04-10 22:12 ` danglin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-04-10 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.5.4


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2012-04-10 12:08 ` [Bug middle-end/52894] [4.5,4.6,4.7 " rguenth at gcc dot gnu.org
@ 2012-04-10 22:12 ` danglin at gcc dot gnu.org
  2012-04-10 22:14 ` danglin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-04-10 22:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from John David Anglin <danglin at gcc dot gnu.org> 2012-04-10 22:11:45 UTC ---
Author: danglin
Date: Tue Apr 10 22:11:38 2012
New Revision: 186296

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186296
Log:
    PR middle-end/52894
    * varasm.c (process_pending_assemble_externals): Set
    pending_assemble_externals_processed true.
    (assemble_external): Call assemble_external_real if the pending
    assemble externals have been processed.


Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/varasm.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2012-04-10 22:12 ` danglin at gcc dot gnu.org
@ 2012-04-10 22:14 ` danglin at gcc dot gnu.org
  2012-04-11  4:19 ` danglin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-04-10 22:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from John David Anglin <danglin at gcc dot gnu.org> 2012-04-10 22:13:56 UTC ---
Author: danglin
Date: Tue Apr 10 22:13:52 2012
New Revision: 186297

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186297
Log:
    PR middle-end/52894
    * varasm.c (process_pending_assemble_externals): Set
    pending_assemble_externals_processed true.
    (assemble_external): Call assemble_external_real if the pending
    assemble externals have been processed.


Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/varasm.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2012-04-10 22:14 ` danglin at gcc dot gnu.org
@ 2012-04-11  4:19 ` danglin at gcc dot gnu.org
  2012-04-11  4:21 ` danglin at gcc dot gnu.org
  2012-12-16 17:35 ` danglin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-04-11  4:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from John David Anglin <danglin at gcc dot gnu.org> 2012-04-11 04:18:50 UTC ---
Author: danglin
Date: Wed Apr 11 04:18:40 2012
New Revision: 186302

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=186302
Log:
    PR middle-end/52894
    * varasm.c (process_pending_assemble_externals): Set
    pending_assemble_externals_processed true.
    (assemble_external): Call assemble_external_real if the pending
    assemble externals have been processed.


Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/varasm.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2012-04-11  4:19 ` danglin at gcc dot gnu.org
@ 2012-04-11  4:21 ` danglin at gcc dot gnu.org
  2012-12-16 17:35 ` danglin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-04-11  4:21 UTC (permalink / raw)
  To: gcc-bugs

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

John David Anglin <danglin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #9 from John David Anglin <danglin at gcc dot gnu.org> 2012-04-11 04:20:46 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52894] [4.5,4.6,4.7 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert
  2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2012-04-11  4:21 ` danglin at gcc dot gnu.org
@ 2012-12-16 17:35 ` danglin at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: danglin at gcc dot gnu.org @ 2012-12-16 17:35 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #10 from John David Anglin <danglin at gcc dot gnu.org> 2012-12-16 17:35:03 UTC ---
Author: danglin
Date: Sun Dec 16 17:34:58 2012
New Revision: 194538

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194538
Log:
    PR middle-end/55709
    Forward port from 4.7 branch:
    2012-04-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

    PR middle-end/52894
    * varasm.c (process_pending_assemble_externals): Set
    pending_assemble_externals_processed true.
    (assemble_external): Call assemble_external_real if the pending
    assemble externals have been processed.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/varasm.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-12-16 17:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-06 21:22 [Bug middle-end/52894] New: [4.5,4.6,4.7,4.8 Regression] Stage1 bootstrap fails with gcc-4.6.3: Infinite loop in pointer_set_insert danglin at gcc dot gnu.org
2012-04-06 21:28 ` [Bug middle-end/52894] " dave.anglin at bell dot net
2012-04-06 21:41 ` danglin at gcc dot gnu.org
2012-04-06 22:43 ` danglin at gcc dot gnu.org
2012-04-07  1:40 ` danglin at gcc dot gnu.org
2012-04-07 19:10 ` danglin at gcc dot gnu.org
2012-04-10 12:08 ` [Bug middle-end/52894] [4.5,4.6,4.7 " rguenth at gcc dot gnu.org
2012-04-10 22:12 ` danglin at gcc dot gnu.org
2012-04-10 22:14 ` danglin at gcc dot gnu.org
2012-04-11  4:19 ` danglin at gcc dot gnu.org
2012-04-11  4:21 ` danglin at gcc dot gnu.org
2012-12-16 17:35 ` danglin at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).