public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/24812]  New: Optimizer creates infinite loop with -fno-strict-aliasing
@ 2005-11-11 20:51 cnewbold at mathworks dot com
  2005-11-11 20:57 ` [Bug rtl-optimization/24812] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: cnewbold at mathworks dot com @ 2005-11-11 20:51 UTC (permalink / raw)
  To: gcc-bugs

The following test program goes into an infinite loop when compiled with -O2
and -fno-strict-aliasing but works correctly if -fno-strict-aliasing is
omitted.

$ g++-3.4 -g -O2 -fno-strict-aliasing -o loop loop.C

// loop.C
class DummyType
{
public:
    ~DummyType() { }
};

class Foo
{
public:
    Foo() : X0(0), X4(0) { }
    int X0, X1, X2, X3, X4;
};

int main(int, char**)
{
    {
        Foo f;
        DummyType d;
    }

    Foo f2;

    bool done(false);

    while (!done) {
        if (f2.X4 != 0) f2.X4 = 0;
        else done = true;;
    }

    return 0;
}

-----

Reading specs from /usr/lib/gcc/i486-linux/3.4.4/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--libexecdir=/usr/lib --with-gxx-include-dir=/usr/include/c++/3.4
--enable-shared --with-system-zlib --enable-nls --without-included-gettext
--program-suffix=-3.4 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt
--enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm
--enable-java-awt=gtk --disable-werror i486-linux
Thread model: posix
gcc version 3.4.4 20050314 (prerelease) (Debian 3.4.3-13)


-- 
           Summary: Optimizer creates infinite loop with -fno-strict-
                    aliasing
           Product: gcc
           Version: 3.4.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cnewbold at mathworks dot com


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


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

* [Bug rtl-optimization/24812] Optimizer creates infinite loop with -fno-strict-aliasing
  2005-11-11 20:51 [Bug rtl-optimization/24812] New: Optimizer creates infinite loop with -fno-strict-aliasing cnewbold at mathworks dot com
@ 2005-11-11 20:57 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-11 20:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-11-11 20:56 -------


*** This bug has been marked as a duplicate of 24804 ***


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2005-11-11 20:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-11 20:51 [Bug rtl-optimization/24812] New: Optimizer creates infinite loop with -fno-strict-aliasing cnewbold at mathworks dot com
2005-11-11 20:57 ` [Bug rtl-optimization/24812] " pinskia 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).