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]

RE: Redundant malloc in structure optimization? (testsuite/gcc.dg/struct/wo_prof_global_var.c)



"Bingfeng Mei" <bmei@broadcom.com> wrote on 01/05/2008 16:02:16:

> Olga,
> Yes, I agree the "p" is global. But how p is going to be accessed if
> another file uses p?  D.2215 represents the original "p", but it is not
> initialized as "p.0.4" and "p.0.3" do. It won't be correct if other file
> tried to use it. Am I right?
>

Yes, the other file cannot use p, it would be incorrect.

The tests in gcc.dg/struct are running under specific flags
-fwhole-program and -combine, which say the compiler that all program
files are given in one compilation line. You can see it in struct-reorg.exp
file. Only under this flags struct-reorg optimization is activated.


Olga.


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