public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/50689] New: AIX bootstrap failure from cgraphunit.c aliases change
@ 2011-10-10 19:07 dje at gcc dot gnu.org
  2011-10-10 19:08 ` [Bug bootstrap/50689] " dje at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: dje at gcc dot gnu.org @ 2011-10-10 19:07 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50689
           Summary: AIX bootstrap failure from cgraphunit.c aliases change
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dje@gcc.gnu.org


Created attachment 25454
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25454
Pre-processed file that is miscompiled

The patch to cgraphunit.c forcing aliases to be output when cgraph decides so
causes an AIX bootstrap failure.  The patch shifts the output of the aliases in
the assembly file to earlier in the file, before the definition.  AIX assembler
is a single pass assembler and does not allow forward references.


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

* [Bug bootstrap/50689] AIX bootstrap failure from cgraphunit.c aliases change
  2011-10-10 19:07 [Bug bootstrap/50689] New: AIX bootstrap failure from cgraphunit.c aliases change dje at gcc dot gnu.org
@ 2011-10-10 19:08 ` dje at gcc dot gnu.org
  2011-10-10 19:09 ` dje at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dje at gcc dot gnu.org @ 2011-10-10 19:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from David Edelsohn <dje at gcc dot gnu.org> 2011-10-10 19:08:13 UTC ---
Created attachment 25456
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25456
Assembler output of miscompiled file


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

* [Bug bootstrap/50689] AIX bootstrap failure from cgraphunit.c aliases change
  2011-10-10 19:07 [Bug bootstrap/50689] New: AIX bootstrap failure from cgraphunit.c aliases change dje at gcc dot gnu.org
  2011-10-10 19:08 ` [Bug bootstrap/50689] " dje at gcc dot gnu.org
@ 2011-10-10 19:09 ` dje at gcc dot gnu.org
  2011-10-10 19:14 ` dje at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dje at gcc dot gnu.org @ 2011-10-10 19:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from David Edelsohn <dje at gcc dot gnu.org> 2011-10-10 19:07:43 UTC ---
Created attachment 25455
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25455
Assembler output of correctly compiled files


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

* [Bug bootstrap/50689] AIX bootstrap failure from cgraphunit.c aliases change
  2011-10-10 19:07 [Bug bootstrap/50689] New: AIX bootstrap failure from cgraphunit.c aliases change dje at gcc dot gnu.org
  2011-10-10 19:08 ` [Bug bootstrap/50689] " dje at gcc dot gnu.org
  2011-10-10 19:09 ` dje at gcc dot gnu.org
@ 2011-10-10 19:14 ` dje at gcc dot gnu.org
  2011-10-14 12:51 ` hubicka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dje at gcc dot gnu.org @ 2011-10-10 19:14 UTC (permalink / raw)
  To: gcc-bugs

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

David Edelsohn <dje at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-10-10
     Ever Confirmed|0                           |1

--- Comment #3 from David Edelsohn <dje at gcc dot gnu.org> 2011-10-10 19:13:52 UTC ---
In the file that works correctly, _ZNSt6localeD1Ev is aliased to
_ZNSt6localeD2Ev near the end of the file, after _ZNSt6localeD2Ev is defined. 
In the incorrect file, it is aliased early, just prior to the definition:

        .csect ._ZNSt6locale5_ImplD2Ev[PR],2
        .globl _ZNSt6localeD1Ev
        .globl  ._ZNSt6localeD1Ev
        .set    ._ZNSt6localeD1Ev,._ZNSt6localeD2Ev
        .set _ZNSt6localeD1Ev,_ZNSt6localeD2Ev
        .csect ._ZNSt6localeD2Ev[PR],2
        .align 2
        .globl _ZNSt6localeD2Ev
        .globl ._ZNSt6localeD2Ev
        .csect _ZNSt6localeD2Ev[DS]
_ZNSt6localeD2Ev:
        .long ._ZNSt6localeD2Ev, TOC[tc0], 0
        .csect ._ZNSt6localeD2Ev[PR],2
._ZNSt6localeD2Ev:
....


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

* [Bug bootstrap/50689] AIX bootstrap failure from cgraphunit.c aliases change
  2011-10-10 19:07 [Bug bootstrap/50689] New: AIX bootstrap failure from cgraphunit.c aliases change dje at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-10-10 19:14 ` dje at gcc dot gnu.org
@ 2011-10-14 12:51 ` hubicka at gcc dot gnu.org
  2011-10-14 18:48 ` dje at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-10-14 12:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-10-14 12:50:54 UTC ---
Thanks. I am testing the following patch. Could you, please, verify that it
soves the problem on AIX?  I am quite convinced the aliases should be output
correctly with this change.
Index: cgraphunit.c
===================================================================
--- cgraphunit.c        (revision 179919)
+++ cgraphunit.c        (working copy)
@@ -1798,7 +1798,6 @@ cgraph_expand_function (struct cgraph_no

   announce_function (decl);
   node->process = 0;
-  assemble_thunks_and_aliases (node);
   gcc_assert (node->lowered);

   /* Generate RTL for the body of DECL.  */
@@ -1808,6 +1807,14 @@ cgraph_expand_function (struct cgraph_no
   gcc_assert (TREE_ASM_WRITTEN (decl));
   current_function_decl = NULL;
   gcc_assert (!cgraph_preserve_function_body_p (node));
+
+  /* It would make a lot more sense to output thunks before function body to
get more
+     forward and lest backwarding jumps.  This is however would need solving
problem
+     with comdats. See PR48668.  Also aliases must come after function itself
to
+     make one pass assemblers, like one on AIX happy.  See PR 50689.
+     FIXME: Perhaps thunks should be move before function IFF they are not in
comdat
+     groups.  */
+  assemble_thunks_and_aliases (node);
   cgraph_release_function_body (node);
   /* Eliminate all call edges.  This is important so the GIMPLE_CALL no longer
      points to the dead function body.  */


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

* [Bug bootstrap/50689] AIX bootstrap failure from cgraphunit.c aliases change
  2011-10-10 19:07 [Bug bootstrap/50689] New: AIX bootstrap failure from cgraphunit.c aliases change dje at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-10-14 12:51 ` hubicka at gcc dot gnu.org
@ 2011-10-14 18:48 ` dje at gcc dot gnu.org
  2011-10-16  9:04 ` hubicka at gcc dot gnu.org
  2014-04-25 23:52 ` dje at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: dje at gcc dot gnu.org @ 2011-10-14 18:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from David Edelsohn <dje at gcc dot gnu.org> 2011-10-14 18:47:15 UTC ---
Bootstrap is not complete, but it is past the location of the failure with your
patch applied.

Thanks, David


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

* [Bug bootstrap/50689] AIX bootstrap failure from cgraphunit.c aliases change
  2011-10-10 19:07 [Bug bootstrap/50689] New: AIX bootstrap failure from cgraphunit.c aliases change dje at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-10-14 18:48 ` dje at gcc dot gnu.org
@ 2011-10-16  9:04 ` hubicka at gcc dot gnu.org
  2014-04-25 23:52 ` dje at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: hubicka at gcc dot gnu.org @ 2011-10-16  9:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> 2011-10-16 09:02:38 UTC ---
Author: hubicka
Date: Sun Oct 16 09:02:33 2011
New Revision: 180053

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180053
Log:

    PR target/48668
    PR target/50689
    * cgraphunit.c (cgraph_expand_function): Expand thunks and alises
    after function body.

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


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

* [Bug bootstrap/50689] AIX bootstrap failure from cgraphunit.c aliases change
  2011-10-10 19:07 [Bug bootstrap/50689] New: AIX bootstrap failure from cgraphunit.c aliases change dje at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-10-16  9:04 ` hubicka at gcc dot gnu.org
@ 2014-04-25 23:52 ` dje at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: dje at gcc dot gnu.org @ 2014-04-25 23:52 UTC (permalink / raw)
  To: gcc-bugs

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

David Edelsohn <dje at gcc dot gnu.org> changed:

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

--- Comment #7 from David Edelsohn <dje at gcc dot gnu.org> ---
Fixed


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

end of thread, other threads:[~2014-04-25 23:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-10 19:07 [Bug bootstrap/50689] New: AIX bootstrap failure from cgraphunit.c aliases change dje at gcc dot gnu.org
2011-10-10 19:08 ` [Bug bootstrap/50689] " dje at gcc dot gnu.org
2011-10-10 19:09 ` dje at gcc dot gnu.org
2011-10-10 19:14 ` dje at gcc dot gnu.org
2011-10-14 12:51 ` hubicka at gcc dot gnu.org
2011-10-14 18:48 ` dje at gcc dot gnu.org
2011-10-16  9:04 ` hubicka at gcc dot gnu.org
2014-04-25 23:52 ` dje 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).