This is the mail archive of the gcc@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]
Other format: [Raw text]

Storage for uninitialized objects (PR 24626)


I have a question about storage for uninitialized objects.

I made the mistake of looking at the code being generated for
testcase #2 in http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24626.
I noticed that reload used the same register r3 for the variables
"call_result" and "node" after the call to after_node_func ().
This appears to occur because "node" is an uninitialized variable.

It seems to me that automatic variables with similar storage
duration should be allocated different storage.  This would ensure
that the same value of "node" is passed in the calls to after_node_func
and T.  With the current code, different values might be passed, and T
could detect the difference in values in a way that doesn't invoke
undefined behavior.

Am I wrong about this?  The main reason I'm concerned about this
is that there have been quite a few optimization issues in GCC 4.0
that have been difficult to debug on the PA-RISC port.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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