This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Strange bug in GCC-Optimization


> Date: Mon, 24 Jul 2000 00:27:24 +0200
> From: Norbert Nemec <nobbi@cheerful.com>
> To: gcc-bugs@gcc.gnu.org

> I would love to send you the offending code, but it is, as I said, machine
> generated, and therefore extremely ugly, and I do not know, how I should
> separate out the offending piece. It is something like:

> Do you have any ideas what to do?

Three possibilities come to mind.  One, check a recent snapshot, and
assume that if it works, that the bugs has been fixed and do nothing.
See gcc.gnu.org for snapshots.

Two, do nothing and hope that someone else can find and report the
bug.  In time, someone will, but it could take a few years.

Three, find a testcase, and send it in.


Off hand, I'd recommend one, then three.  I can help you with option
three.  First, run gcc -E to get the output of the preprocessor.  This
gives you a testcase, worse case scenario.  From there, if you can
trim it up, that would be helpful. I'd start by removing the end of
the file (all functions past the one in question) and see if that
still can reproduce it.  From there, you can remove all non-dependent
code before the function, verifying the testcase still works as you
go.  Then you can remove all non-dependent code in the function,
verifying as you go.  After those steps, one usually has about 5-20
lines of testcase.

The benefit of finding the small testcase, is that it can be added to
the testsuite and we can ensure that no future gcc release contains
that bug.

Bear in mind, even if you cannot trim the testcase, you can still put
it up for anon ftp or put it on the web, and mail a pointer to the
larger testcase.  Just be sure to include pointers to the wrong
routine and what is wrong with it.  Pointers into the assembly is
nice.

Hope this helps.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]