Related articles |
---|
[15 earlier articles] |
Re: binary search debugging of compilers spibou@gmail.com (Spiros Bousbouras) (2023-05-18) |
Re: binary search debugging of compilers rsc@swtch.com (Russ Cox) (2023-05-18) |
Re: binary search debugging of compilers 864-117-4973@kylheku.com (Kaz Kylheku) (2023-05-19) |
Re: binary search debugging of compilers 864-117-4973@kylheku.com (Kaz Kylheku) (2023-05-19) |
binary search debugging of compilers cclick0@gmail.com (Cliff Click) (2023-05-19) |
binary search debugging of compilers tekk.nolagi@gmail.com (Max B) (2023-05-19) |
Re: binary search debugging of compilers tkoenig@netcologne.de (Thomas Koenig) (2023-05-19) |
Re: binary search debugging of compilers mrs@kithrup.com (2023-05-20) |
Re: binary search debugging of compilers gah4@u.washington.edu (gah4) (2023-05-20) |
Re: Old C compilers, binary search debugging of compilers DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2023-05-22) |
From: | Thomas Koenig <tkoenig@netcologne.de> |
Newsgroups: | comp.compilers |
Date: | Fri, 19 May 2023 21:59:33 -0000 (UTC) |
Organization: | news.netcologne.de |
References: | 23-05-003 23-05-005 23-05-006 23-05-008 23-05-011 23-05-012 23-05-015 23-05-017 23-05-020 |
Injection-Info: | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="547"; mail-complaints-to="abuse@iecc.com" |
Keywords: | tools, debug |
Posted-Date: | 20 May 2023 18:03:05 EDT |
Kaz Kylheku <864-117-4973@kylheku.com> schrieb:
> Oh, stepping doubles with ++ is, I would say, not *that* uncommon.
> I doubt that if such a bug were introduced as an easter egg into GCC,
> it would go very long without being discovered by the FOSS distros and
> other downstream users.
It would very likely be caught by regression testing. GCC has an
extensive test suite, and it is a requirement that this is run
before submitting a patch.
If that slips through (as can happen from time to time, for
example for different architectures or operating systems), then
the automated regression testers will flag it.
If not that, the automated SPEC testers also have a good chance
of catching it.
As an aside, the post-increment operator is converted to its
equivalent assignment statement very early, during gimplification.
In the following example, the result of the first two passes that
GCC performs are shown - the first is a reproduction of the source
code, as parsed, and the second one after lowering to GIMPLE.
File names may differ bit depending on whic version of GCC you use.
$ cat double.c
double c;
void foo()
{
c++;
}
$ gcc -c -fdump-tree-original -fdump-tree-gimple double.c
$ cat double.c.004t.original
;; Function foo (null)
;; enabled by -tree-original
{
c++ ;
}
$ cat double.c.005t.gimple
foo ()
{
c.0_1 = c;
_2 = c.0_1 + 1.0e+0;
c = _2;
}
Return to the
comp.compilers page.
Search the
comp.compilers archives again.