https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117907
Bug ID: 117907
Summary: Inconsistent usages of TARGET_PROMOTE_PROTOTYPES
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
TARGET_PROMOTE_PROTOTYPES is an optimization hook, which promotes integer
arguments smaller than int to int if TARGET_PROMOTE_PROTOTYPES returns true.
Some frontends, like C, C++ and Ada, apply this hook to change small integer
argument type, DECL_ARG_TYPE, to int. But not all frontends do that. Since
combine.cc uses DECL_ARG_TYPE to perform optimization, this discrepancy may
lead to the incorrect run-time behavior in a mixed language program.