[Bug c++/105946] [12/13 Regression] ICE in maybe_warn_pass_by_reference, at tree-ssa-uninit.cc:843

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jun 14 09:09:49 GMT 2022


Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
   Last reconfirmed|                            |2022-06-14
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
           Keywords|                            |needs-reduction
   Target Milestone|---                         |12.2
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---

(gdb) p debug_gimple_stmt (stmt)
# .MEM_8 = VDEF <.MEM_7(D)>
_2 = std::__new_allocator<std::vector<T> >::allocate (__n_1(D), 0B);

842           tree arg = gimple_call_arg (stmt, argno - 1);
(gdb) p argno
$2 = 3
(gdb) p debug_generic_expr (fntype)
struct vector * __new_allocator::<T514c> (struct __new_allocator *, size_type,
const void *)

so the number of actual arguments does not match the function type of the call.

I have a simple patch.

More information about the Gcc-bugs mailing list