This is the mail archive of the gcc-bugs@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]

[Bug fortran/35223] IBITS gives compiler error



------- Comment #11 from sgk at troutmask dot apl dot washington dot edu  2008-02-17 19:59 -------
Subject: Re:  IBITS gives compiler error

On Sun, Feb 17, 2008 at 07:10:19PM -0000, jvdelisle at gcc dot gnu dot org
wrote:
> ------- Comment #9 from jvdelisle at gcc dot gnu dot org  2008-02-17 19:10 -------
> We do need to fix some things here.  The runtime perhaps should catch the
> invalid of pos + len > 32 for bit_size being 32.
> 

(snip)

> So I support removing the range check just for these bit manipulation
> procedures.

Yes, that is probably a good compromise, then let the middle-end
deal with possible out of range values.  One probably needs to
check the expansion of 

  i = -1
  i = ibits(i,0,32)

-fdump-tree-original shows

  i = -1;
  i = i >> 0 & ~(-1 << 32);

for the above, which of course gives the user desired result of -1.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35223


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