From: "Ed Vogel" <Edward.Vogel_stop_the_spam@hp.com>
Subject: Re: 5.1b CC Compiler Optimization - Structure passed to function losing values
Date: Thu, 11 Dec 2003 19:03:11 GMT [thread overview]
Message-ID: <Pb3Cb.10546$hU7.5449@news.cpqcorp.net> (raw)
In-Reply-To: 2de13807.0312071026.3e7bf983@posting.google.com
"John" <eeh4@fsmail.net> wrote in message
news:2de13807.0312071026.3e7bf983@posting.google.com...
> I have two problems / questions, firstly why is the compiler choosing
> to inline the function given the error message that it reports?
Because the inlining is chosen before the uninitialized condition
is detected. There is no way to "unmake" the decision. Also,
the diagnostic is not an error, just a warning letting the user know
that some uninitialized variable has been fetched. In this case
it seems a compiler bug is causing the storage to become
uninitialized.
> Secondly how can I restructure the code to prevent this error?
Probably the easiest way is to add the -inline none switch. This
will prevent inlinning which seems to be the cause of the problem.
This compiler bug sounds somewhat familiar. I believe we have
corrected it, but I'm not certain if the fix has been released yet.
As your example did not provide a complete reproducer, I can not
be sure. I would suggest you download the latest C compiler. A
link can be found at the DTK web site: http://h30097.www3.hp.com/dtk/
If this compiler does not correct the problem, it should be reported via
formal support channels.
Ed Vogel
HP C Engineering.
prev parent reply other threads:[~2003-12-11 19:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-07 18:26 5.1b CC Compiler Optimization - Structure passed to function losing values John
2003-12-11 19:03 ` Ed Vogel [this message]
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