------- Comment #4 from pinskia at gcc dot gnu dot org  2006-02-07 00:35 -------
Reduced testcase:
struct Pitch
{
  int notename_;
};
struct Audio_note
{
  Audio_note (Pitch p);
};
void create_audio_elements ()
{
  Pitch *pit;
  new Audio_note (*pit);
}
--------
Looks like this is caused by:
2006-01-30  Richard Guenther  <[EMAIL PROTECTED]>

        PR c++/23372
        * gimplify.c (gimplify_target_expr): Handle easy cases
        without creating a temporary.
------
The reason I said this patch is because the IR looks like:
  (void) (TARGET_EXPR <D.2018, *(struct Pitch &) (struct Pitch *)
NON_LVALUE_EXPR <pit>>;, TARGET_EXPR <D.1993, (struct Audio_note *) operator
new (1)>;, try
    {
      __comp_ctor  (NON_LVALUE_EXPR <D.1993>, D.2018);
    }
  catch
    {
      operator delete ((void *) D.1993);
    }, D.1993) >>>
>>;
So we reduce the TARGET_EXPR to *pit but we reference  D.2018 in the other
expression.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-07 00:35:43
               date|                            |


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

Reply via email to