------- Comment #9 from jakub at gcc dot gnu dot org  2008-11-11 10:04 -------
Short testcase:
extern void bar (long double *);

void
foo (long double x)
{
  bar (&x);
}

fails also with C.  The problem is that gimplify_parameters for
reference_callee_copied copies the long double PARM_DECL into a local VAR_DECL
copy.  But as the PARM_DECL was marked as TREE_ADDRESSABLE by the FE (the body
of the function takes address of the argument) and the local copy is marked
addressable during gimplification (again, the body takes address of the
parameter, which is now DECL_VALUE_EXPRed to the local VAR_DECL), this triggers
verification failure, as one addressable var is assigned into another one.

I think either we should if parm is TREE_ADDRESSABLE move that flag over to
local (i.e. parm would be no longer TREE_ADDRESSABLE, local would be) in
gimplify_parameters, or we'd need to add another temporary in between.
I'll attach the first solution soon.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-11-11 10:04:15
               date|                            |


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

Reply via email to