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: About the is_gimple_min_invariant predicate


On 7/4/07, Eric Botcazou <ebotcazou@adacore.com> wrote:
Ada bootstrap has been broken by the SCC value numbering patch too (this is PR
tree-optimization/32589) but this might be due to a latent problem.

In the FRE dump:

RHS &p__name_buffer[1]{lb: 1 sz: 1} + n_32 simplified to
&p__name_buffer[(<unnamed-signed:32>) MAX_EXPR <D.738_31, 0> + 1]{lb: 1 sz:
1} has constants 0

and the latter expression is caught by the GIMPLE expression verifier:

error: invalid array index (<unnamed-signed:32>) MAX_EXPR <D.738_31, 0> + 1;

This is invalid gimple. Can you figure our why we don't gimplify this to


tmp_1 = MAX_EXPR <D.738_31, 0>;
tmp_2 = (<unnamed-signed:32>)tmp_1;
tmp_3 = tmp_2 + 1;
&p_name_buffer[tmp3]

? We shouldn't allow expressions (even if invariant) in such places.

Richard.


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