Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Joerg Czeranski <jc@joerch.org>
Subject: 4.0D/4.0E DEC C optimization bug
Date: 1999/04/10	[thread overview]
Message-ID: <5tXNlnALx$2QR$1@joerch.org> (raw)

Hi,

DEC C V5.6-071 on Digital UNIX V4.0 (Rev. 878),
DEC C V5.7-566 (cc.alt) on Digital UNIX V4.0 (Rev. 878), and
DEC C V5.8-009 on Digital UNIX V4.0 (Rev. 1091)
(I didn't check any others, but AFAIR the same source worked with
the Dec Unix 4.0A compiler)
exhibit a problem compiling sigsetjmp with optimization:

If a local non-volatile automatic variable is written before
the sigsetjmp and read in the "true" branch of "if (sigsetjmp(...))"
but not used elsewhere, the compiler might decide sharing
its location with a different local variable between sigsetjmp
and siglongjmp.

The documentation, the C9X draft, and the Single Unix Spec. say
that such a variable may only have an indeterminant value if it's
written after a setjmp - referring to setjmp/longjmp.

Am I mistaken in assuming the same should apply to sigsetjmp/siglongjmp
or is this a bug?

I found this problem when I compiled the Objective Caml compiler, and
isolated it.
I'll post a source listing that demonstrates it.

joerch



             reply	other threads:[~1999-04-10  4:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-10  4:00 Joerg Czeranski [this message]
1999-04-12  4:00 ` 4.0D/4.0E DEC C optimization bug Bernhard Reiter
1999-04-13  4:00   ` Jeff Sullivan
1999-04-13  4:00 ` Jeff Sullivan
1999-04-15  4:00   ` Joerg Czeranski
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox