[Bug c++/33025] [4.3 Regression] Wrong calling of placement new with conditionals

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Aug 8 18:55:00 GMT 2007



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-08-08 18:55 -------
                        data[i] = (i%2==0) ? new(alloc.value()) unsigned(2) :
new(alloc()) unsigned(1);


          D.2395 = value (&alloc);
          D.2367 = D.2395;
          D.2396 = operator() (&alloc);

    unsigned int * D.2367;
  <<cleanup_point <<< Unknown tree: expr_stmt
  (void) (D.2367 = value (&alloc)) >>>
>>;
    unsigned int * D.2384;
  <<cleanup_point <<< Unknown tree: expr_stmt
  (void) (D.2384 = operator() (&alloc)) >>>
>>;


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Keywords|                            |wrong-code
            Summary|Wrong optimisation          |[4.3 Regression] Wrong
                   |                            |calling of placement new
                   |                            |with conditionals
   Target Milestone|---                         |4.3.0


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



More information about the Gcc-bugs mailing list