[Bug middle-end/41250] hppa has DECL_VALUE_EXPR decls appearing in the function

jamborm at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Sep 7 16:29:00 GMT 2009



------- Comment #1 from jamborm at gcc dot gnu dot org  2009-09-07 16:28 -------
We have discussed this in the mailing list thread that eventually lead
to http://gcc.gnu.org/ml/gcc-patches/2009-09/msg00374.html

The bottom line is that we two options:

1) Do not set DECL_VALUE_EXPR to callee copied parameters in
   gimplify_parameters() and represent the convention explicitely.  I
   have tested this preliminary by running the c testsuite (no
   bootstrap or some such thing) and so far found no ICEs or
   miscompilations.

   The drawback is that this approach will most probably mess up debug
   info and the link in between the original and actual parameter will
   get lost.  The benefit is that we would uphold the stated (but
   currently violated) rule that declarations with the DECL_VALUE_EXPR
   do not occur in the function body.

2) The second approach is to teach gimplifier not to do the
   substitutions which can be bogus.  Once the function body has been
   gimplifed, we might set some flag in the gimplification context or,
   alternatively, I'm about to try to simply disable the substitutions
   in gimplify_var_or_parm_decl() for PARM_DECLs.

   This would mean we would need to drop the rule not allowing such
   decls in the function body.  I don't know whether it needs to be
   replaced by some weaker restriction.


-- 

jamborm at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu dot
                   |                            |org


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



More information about the Gcc-bugs mailing list