https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63349
Bug ID: 63349
Summary: ICE with template in fold-const.c
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Reported at https://gcc.gnu.org/ml/gcc-help/2014-09/msg00127.html .
Take:
struct timeval
{
int tv_sec;
};
// needs to be a template
template<typename T>
int test(int flag)
{
struct timeval a, b;
return ((a.tv_sec == b.tv_sec ? false : true) + flag);
// needs to use `flag'/operator
}