This is the mail archive of the 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: [PATCH] Avoid introducing TREE_OVERFLOWs in (T)(x&cst) -> (T)x & (T)cst optimization (PR middle-end/19857)

> However, I believe that all of these problems will go away in
> the near future, once the middle-end stops setting TREE_OVERFLOW
> and TREE_CONSTANT_OVERFLOW in fold_const.  I've already posted a
> patch at
> The only thing blocking that patch was that a C front-end maintainer
> wanted me to write an extensive set of C test cases to check that
> the C front-end would generate all the required diagnostics.

Sorry if this has already been mentioned, but I think your patch might be 
harmful to the Ada compiler, at least without specific counter-measures.  My 
understanding is that gigi relies on TREE_OVERFLOW being set by fold to issue 
warnings and detect CONSTRAINT_ERRORs at compile-time.  And, in some cases, 
that's vital (from Ada's viewpoint) because things would wrap around in the 
target's arithmetics, hence would go unnoticed at run-time.

In any cases, if you don't mind, I think you should seek some form of buy-in 
from Richard Kenner.

Eric Botcazou

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