This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/34483] wo_prof_two_strs.c:56: internal compiler error: in find_new_var_of_type, at ipa-struct-reorg.c:605
- From: "olga at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 7 Feb 2008 10:26:08 -0000
- Subject: [Bug middle-end/34483] wo_prof_two_strs.c:56: internal compiler error: in find_new_var_of_type, at ipa-struct-reorg.c:605
- References: <bug-34483-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #67 from olga at gcc dot gnu dot org 2008-02-07 10:26 -------
(In reply to comment #66)
> I looked wo_prof_global_var.c. The test passes with the above options.
> The floating point convert operations look similar to those with
> -fipa-struct-reorg. However, there's just one malloc call and the
> values allocated for b are all zero.
I see your point. Indeed, struct-reorg generates two additional mallocs, one
additional for each structure field, so that original malloc is not used any
more. (I hoped compiler optimizes it out, but it does not happen.) Your
investigation implies that original malloc was initialized to zero, while
mallocs generated by this optimization are not, that cause the failure.
I looked into assembly you send and see the following difference:
for original malloc there is additional instruction
stwm %r4,64(%r30)
before malloc call, while for first artificial malloc (field a, I suppose)
there is similar instruction
stw %r3,-60(%r30)
but for the second artificial malloc there isn't. ("Copy" instructions are to
carry results of the malloc).
As I am not familiar with hp assembler, can you please explain what is the
meaning of this instruction? Probably my suspicion is wrong.
Olga
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34483