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]

Re: Pointers Extend Unsigned Question


It definitely isn't handling the issue consistently, but looking
at the code where it's tripping up, it seems that the intent THERE is
that the RTL should contain sign extensions, but it's unclear
from any documentation what the intent really is.  (It could
be handled "under the covers" as well in both places (??), but it
would be uglier, I think.)

The path to the actual failure is long and VERY obscure, and
since it occurs in the "keep trying until you find something
you like" code in combine.c, it never makes it to a file where
it would be relatively easy to see (until the difference is so
great that it's unrecognizable... a split and a couple of folds
occur after the actual problem).

I have all the ugly details, and can send them, but knowing the
authors' intent would be very useful.

Donn


Joern Rennecke wrote:
> 
> > This is an extract of a trivial function returning a pointer,
> > where the value is (ptr) (HOST_WIDE_INT) -1.  (Don't say
> > "don't do that": it's from gcc/calls.c!)
> 
> If the value is compared against (ptr) (HOST_WIDE_INT) -1 ,
> and the compiler does the extensions consistently, this should
> work regardless of whether it zero extends or sign extends.

-- 

===================================================
Donn Terry                  mailto:donn@interix.com
Softway Systems, Inc.        http://www.interix.com
2850 McClelland Dr, Ste. 1800   Ft.Collins CO 80525
Tel: +1-970-204-9900           Fax: +1-970-204-9951
===================================================

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