------- Comment #6 from rguenth at gcc dot gnu dot org 2008-01-08 23:19 -------
struct s
{
long long id() const { return (this->a << 16) >> 16; }
long long a : 48;
int i1 : 16;
};
long long bar(struct s *x) { return (x->a << 16) >> 16; }
shows different IL from the FE for id() vs bar():
;; Function long long int s::id() const (_ZNK1s2idEv)
;; enabled by -tree-original
return <retval> = (long long int) (((<unnamed-signed:48>) ((const struct s *)
this)->a << 16) >> 16);
;; Function long long int bar(s*) (_Z3barP1s)
;; enabled by -tree-original
return <retval> = ((long long int) x->a << 16) >> 16;
despite what the correct semantics is (which is I believe the one of id()),
there is a bogus inconsistency.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
Last reconfirmed|2007-12-08 19:59:41 |2008-01-08 23:19:38
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33819