This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52849] New: crash when using suscript operator in delctype argument
- From: "freunddeslichts at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 03 Apr 2012 18:24:45 +0000
- Subject: [Bug c++/52849] New: crash when using suscript operator in delctype argument
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52849
Bug #: 52849
Summary: crash when using suscript operator in delctype
argument
Classification: Unclassified
Product: gcc
Version: 4.4.7
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: freunddeslichts@web.de
// the following compile crashes
// $> g++-4.4 -std=c++0x gcc44_bug.cpp
// it works in 4.5, but I'm writing a library that must work on all versions
// exact version is 4.4.7 (Ubuntu/Linaro 4.4.7-1ubuntu1) on 32 bit Linux
template <class T>
auto bug(T* t) -> decltype(t[0])
{
return *t;
}
int main(void)
{
int i;
bug(&i);
return 0;
}