public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/46204] New: g++.dg/torture/stackalign/throw-1.C fails to compile on IA64
@ 2010-10-27 23:22 sje at cup dot hp.com
  2010-10-29 21:38 ` [Bug rtl-optimization/46204] " sje at cup dot hp.com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sje at cup dot hp.com @ 2010-10-27 23:22 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: g++.dg/torture/stackalign/throw-1.C fails to compile
                    on IA64
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: link-failure
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: sje@cup.hp.com
              Host: ia64-*-*
            Target: ia64-*-*
             Build: ia64-*-*


I am not sure exactly where this is going wrong but when
g++.dg/torture/stackalign/throw-1.C is compiled with -O3 -funroll-loops on IA64
I get an undefined label.

Here is a cutdown test case based on that test:

int global, global2;
int main()
{
        int i,j,k,l,m,n;
   for (i=0; i < global; i++)
   for (k=0; k < j; k++)
   for (l=0; l < k; l++)
   for (m=0; m < l; m++)
       global2 = k;
 throw 0;
}

When I compile it I get:

g++ -O3 -funroll-loops x.C
/tmp/ccVWUtRi.o: In function `main':
x.C:(.text+0xc2): undefined reference to `.L34'
collect2: ld returned 1 exit status


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

* [Bug rtl-optimization/46204] g++.dg/torture/stackalign/throw-1.C fails to compile on IA64
  2010-10-27 23:22 [Bug middle-end/46204] New: g++.dg/torture/stackalign/throw-1.C fails to compile on IA64 sje at cup dot hp.com
@ 2010-10-29 21:38 ` sje at cup dot hp.com
  2010-11-02 17:31 ` amonakov at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sje at cup dot hp.com @ 2010-10-29 21:38 UTC (permalink / raw)
  To: gcc-bugs

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

Steve Ellcey <sje at cup dot hp.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.10.29 21:38:07
                 CC|                            |abel at gcc dot gnu.org
          Component|middle-end                  |rtl-optimization
     Ever Confirmed|0                           |1

--- Comment #1 from Steve Ellcey <sje at cup dot hp.com> 2010-10-29 21:38:07 UTC ---
It looks like this is a bug in the selective scheduler.  If I use
-fno-selective-scheduling then the label in question is not removed
and the program compiles correctly.

Marking it as confirmed since I see it in H.J. and Andreas test runs
sent to gcc-testresults.


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

* [Bug rtl-optimization/46204] g++.dg/torture/stackalign/throw-1.C fails to compile on IA64
  2010-10-27 23:22 [Bug middle-end/46204] New: g++.dg/torture/stackalign/throw-1.C fails to compile on IA64 sje at cup dot hp.com
  2010-10-29 21:38 ` [Bug rtl-optimization/46204] " sje at cup dot hp.com
@ 2010-11-02 17:31 ` amonakov at gcc dot gnu.org
  2010-11-13  9:33 ` amonakov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-11-02 17:31 UTC (permalink / raw)
  To: gcc-bugs

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

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |amonakov at gcc dot gnu.org

--- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-11-02 17:30:54 UTC ---
The scheduler is confused by a conditional jump to the next instruction (and
the fact that the containing BB has only one outgoing edge, which is also
marked fallthru).  When we delete the successor block, we don't notice that we
are also deleting the label used in that fallthru condjump.

I'm testing the following patch:

diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index 141c935..9d6635b 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -3616,6 +3616,19 @@ maybe_tidy_empty_bb (basic_block bb, bool
recompute_toporder_p)
               rescan_p = true;
               break;
             }
+      else if (single_succ_p (pred_bb) && any_condjump_p (BB_END (pred_bb)))
+        {
+          if (INSN_SCHED_TIMES (BB_END (pred_bb)) == 0
+          && !IN_CURRENT_FENCE_P (BB_END (pred_bb)))
+        {
+          if (!sel_remove_insn (BB_END (pred_bb), false, false))
+            tidy_fallthru_edge (e);
+        }
+          else
+        sel_redirect_edge_and_branch (e, succ_bb);
+          rescan_p = true;
+          break;
+        }
         }
     }


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

* [Bug rtl-optimization/46204] g++.dg/torture/stackalign/throw-1.C fails to compile on IA64
  2010-10-27 23:22 [Bug middle-end/46204] New: g++.dg/torture/stackalign/throw-1.C fails to compile on IA64 sje at cup dot hp.com
  2010-10-29 21:38 ` [Bug rtl-optimization/46204] " sje at cup dot hp.com
  2010-11-02 17:31 ` amonakov at gcc dot gnu.org
@ 2010-11-13  9:33 ` amonakov at gcc dot gnu.org
  2010-11-13 10:02 ` amonakov at gcc dot gnu.org
  2011-04-07  6:52 ` abel at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-11-13  9:33 UTC (permalink / raw)
  To: gcc-bugs

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

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

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

--- Comment #4 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-11-13 09:30:14 UTC ---
Fixed.


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

* [Bug rtl-optimization/46204] g++.dg/torture/stackalign/throw-1.C fails to compile on IA64
  2010-10-27 23:22 [Bug middle-end/46204] New: g++.dg/torture/stackalign/throw-1.C fails to compile on IA64 sje at cup dot hp.com
                   ` (2 preceding siblings ...)
  2010-11-13  9:33 ` amonakov at gcc dot gnu.org
@ 2010-11-13 10:02 ` amonakov at gcc dot gnu.org
  2011-04-07  6:52 ` abel at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-11-13 10:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-11-13 09:28:55 UTC ---
Author: amonakov
Date: Sat Nov 13 09:28:52 2010
New Revision: 166697

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166697
Log:
    PR rtl-optimization/46204
    * sel-sched-ir.c (maybe_tidy_empty_bb): Remove second argument.
    Update all callers.  Do not recompute topological order.  Adjust
    fallthrough edges following a degenerate conditional jump.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/sel-sched-ir.c


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

* [Bug rtl-optimization/46204] g++.dg/torture/stackalign/throw-1.C fails to compile on IA64
  2010-10-27 23:22 [Bug middle-end/46204] New: g++.dg/torture/stackalign/throw-1.C fails to compile on IA64 sje at cup dot hp.com
                   ` (3 preceding siblings ...)
  2010-11-13 10:02 ` amonakov at gcc dot gnu.org
@ 2011-04-07  6:52 ` abel at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: abel at gcc dot gnu.org @ 2011-04-07  6:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrey Belevantsev <abel at gcc dot gnu.org> 2011-04-07 06:51:52 UTC ---
Author: abel
Date: Thu Apr  7 06:51:49 2011
New Revision: 172078

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172078
Log:
        Backport from mainline
        2010-11-12  Alexander Monakov  <amonakov@ispras.ru>

        PR rtl-optimization/46204
         sel-sched-ir.c (maybe_tidy_empty_bb): Remove second argument.
        pdate all callers.  Do not recompute topological order.  Adjust
        allthrough edges following a degenerate conditional jump.


Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/sel-sched-ir.c


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

end of thread, other threads:[~2011-04-07  6:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-27 23:22 [Bug middle-end/46204] New: g++.dg/torture/stackalign/throw-1.C fails to compile on IA64 sje at cup dot hp.com
2010-10-29 21:38 ` [Bug rtl-optimization/46204] " sje at cup dot hp.com
2010-11-02 17:31 ` amonakov at gcc dot gnu.org
2010-11-13  9:33 ` amonakov at gcc dot gnu.org
2010-11-13 10:02 ` amonakov at gcc dot gnu.org
2011-04-07  6:52 ` abel 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).