Fw: [PATCH] ipa struct reorg: Fix wrong result type of generated mallocs

Olga Golovanevsky OLGA@il.ibm.com
Wed Jan 23 18:47:00 GMT 2008



On Jan 23, 2008 5:20 PM, Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
wrote:
> Hello,
>
> the ipa struct reorg pass currently generates malloc calls with int as
> result type breaking 64bit targets.
>
> The ipa testcases on x86_64 didn't show any problems since the
> returned addresses all lie below 2G.
>
> Bootstrapped on x86_64, s390 and s390x.
> No testsuite regressions on s390 and s390x.
>
> On s390x the following testcases are fixed with the patch:
>
> < FAIL: gcc.dg/struct/wo_prof_global_var.c execution test
> < FAIL: gcc.dg/struct/wo_prof_local_var.c execution test
> < FAIL: gcc.dg/struct/wo_prof_mult_field_peeling.c execution test
> < FAIL: gcc.dg/struct/wo_prof_two_strs.c execution test
> < FAIL: gcc.dg/struct/w_prof_global_var.c execution,    -O3
-fwhole-program -combine -fipa-type-escape -fprofile-use -fipa-struct-reorg
-fdump-ipa-all
> < FAIL: gcc.dg/struct/w_prof_local_var.c execution,    -O3
-fwhole-program -combine -fipa-type-escape -fprofile-use -fipa-struct-reorg
-fdump-ipa-all
> < FAIL: gcc.dg/struct/w_prof_two_strs.c execution,    -O3 -fwhole-program
-combine -fipa-type-escape -fprofile-use -fipa-struct-reorg -fdump-ipa-all
>
> Unfortunately with the patch I see a new failure on x86_64.  The
> wo_prof_malloc_size_var testcases ICEes in safe_cond_expr_check.  But
> since I'm able to provoke this failure also without my patch I don't
> think it is related to this trivial change.  It seems to be the
> problem from PR34472 which is triggered accidently by this patch as
> well.
>
> Ok for mainline?

Great you found it!

It is looks like the solution for PR 34483 and possibly for PR 34534.

Dave, Dominique, H.J.Lu,

Can you confirm please that it works for
your systems together with Richard's patch (in comment #11)
and with mine patch (in comment #31)?

Olga



More information about the Gcc-patches mailing list