This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/18951] Invalid code generated by expand_errno_check
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2004 10:32:23 -0000
- Subject: [Bug middle-end/18951] Invalid code generated by expand_errno_check
- References: <20041213102416.18951.jakub@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From jakub at gcc dot gnu dot org 2004-12-13 10:32 -------
Smaller example:
double sqrt (double);
double foo (void);
double x;
int main (void)
{
x = sqrt (foo ());
}
in one .c file and
extern void abort (void);
double foo (void)
{
static int once;
if (once++)
abort ();
return 0.0 / 0.0;
}
in another one.
foo () is called twice, but must be called just once.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18951