https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88372

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
+      /* If there is no function, look at the type of the called
+        expression in case it's been declared attribute alloc_size.  */
+      callee = gimple_call_fn (call);
+      if (callee && TREE_CODE (TREE_TYPE (callee)) == POINTER_TYPE)
+       callee = TREE_TYPE (callee);

you should alway suse gimple_call_fntype here.

Reply via email to