[Bug c++/26883] ICE when assigning memory attribute to class with simple constructor

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Mar 27 08:09:00 GMT 2006



------- Comment #1 from rguenth at gcc dot gnu dot org  2006-03-27 08:09 -------
We ICE in

      if (base && DECL_P (base)
          && TREE_READONLY (base)
          && (TREE_STATIC (base) || DECL_EXTERNAL (base)))
        {
          tree base_type = TREE_TYPE (base);
          gcc_assert (!(base_type && TYPE_NEEDS_CONSTRUCTING (base_type))
                      || DECL_ARTIFICIAL (base));
          MEM_READONLY_P (ref) = 1;

Now, it is indeed questionable to put a non-POD into ro memory.  So I think
this is INVALID - but let's see what others think.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |c++


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



More information about the Gcc-bugs mailing list