public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/24762]  New: [killloop-branch] code motion of non-invariant expressions with hard registers.
@ 2005-11-09 20:11 steven at gcc dot gnu dot org
  2005-11-09 20:12 ` [Bug rtl-optimization/24762] " steven at gcc dot gnu dot org
                   ` (19 more replies)
  0 siblings, 20 replies; 22+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-11-09 20:11 UTC (permalink / raw)
  To: gcc-bugs

The killloop-branch produces wrong code for the following test due to a bug in
loop-invariant.c or code related to it.

extern "C" void abort(void);
class runtime_error {};
void test01(int iters)
{
    for (int i = 0;   i < iters;   ++i)
    {
        try  {
            throw runtime_error();
            abort();
        } catch (runtime_error&) {  }
    }
}

int main(int argc, char* argv[])
{
    test01(1);
    return 0;
}

The problem is that the following expression is moved out of the loop:

(insn 64 63 54 3 (set (reg:DI 350)
        (reg:DI 16 r16)) 5 {*movdi_internal} (nil)
    (nil))

See the attached dumps.  So far I can only reproduce the bug on IA-64. 
Obviously, exceptions are involved somehow.  On ia64, there are also over 300
libjava failures that disappear when loop-invariant.c is disabled.


-- 
           Summary: [killloop-branch] code motion of non-invariant
                    expressions with hard registers.
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
GCC target triplet: ia64


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


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

end of thread, other threads:[~2006-02-09 22:34 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-09 20:11 [Bug rtl-optimization/24762] New: [killloop-branch] code motion of non-invariant expressions with hard registers steven at gcc dot gnu dot org
2005-11-09 20:12 ` [Bug rtl-optimization/24762] " steven at gcc dot gnu dot org
2005-11-09 20:12 ` steven at gcc dot gnu dot org
2005-11-09 21:08 ` pinskia at gcc dot gnu dot org
2005-11-09 21:14 ` pinskia at gcc dot gnu dot org
2005-11-09 22:30 ` rakdver at gcc dot gnu dot org
2005-11-09 22:53 ` dberlin at gcc dot gnu dot org
2005-11-09 22:57 ` dberlin at gcc dot gnu dot org
2005-11-09 23:15 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-11-09 23:30 ` dberlin at gcc dot gnu dot org
2005-11-09 23:45 ` steven at gcc dot gnu dot org
2005-11-09 23:56   ` Daniel Berlin
2005-11-09 23:56 ` dberlin at dberlin dot org
2005-11-11 17:52 ` pinskia at gcc dot gnu dot org
2005-11-14 22:47 ` steven at gcc dot gnu dot org
2005-11-14 23:10 ` dberlin at gcc dot gnu dot org
2005-11-15 14:27 ` rakdver at gcc dot gnu dot org
2006-01-14 16:59 ` steven at gcc dot gnu dot org
2006-01-14 17:24 ` steven at gcc dot gnu dot org
2006-01-27 22:23 ` zadeck at gcc dot gnu dot org
2006-02-09 22:34 ` rakdver at gcc dot gnu dot org
2006-02-09 22:34 ` rakdver at gcc dot gnu dot 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).