[Bug tree-optimization/15484] New: [tree-ssa] bool and short function arguments promoted to int
dann at godzilla dot ics dot uci dot edu
gcc-bugzilla@gcc.gnu.org
Mon May 17 19:20:00 GMT 2004
This code:
_Bool bar (_Bool a);
_Bool foo1 (_Bool a)
{
if (bar(a)) return 1;
else return 0;
}
static short barshort (short a);
short foo1short (short a)
{
if (barshort(a)) return 1;
else return 0;
}
is transformed to: (when using -O -fdump-tree-generic)
foo1 (a)
{
int T.17;
_Bool T.18;
T.17 = (int)a; <------ this is not needed
T.18 = bar (T.17);
if (T.18 != 0)
{
return 1;
}
else
{
return 0;
}
}
foo1short (a)
{
int T.19;
short int T.20;
T.19 = (int)a; <------ this is not needed
T.20 = barshort (T.19);
if (T.20 != 0)
{
return 1;
}
else
{
return 0;
}
}
the promotions shown are not needed, at least not at this point in the
compilation process.
--
Summary: [tree-ssa] bool and short function arguments promoted to
int
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dann at godzilla dot ics dot uci dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15484
More information about the Gcc-bugs
mailing list