public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/52849] New: crash when using suscript operator in delctype argument
@ 2012-04-03 18:25 freunddeslichts at web dot de
2012-04-03 18:26 ` [Bug c++/52849] " freunddeslichts at web dot de
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: freunddeslichts at web dot de @ 2012-04-03 18:25 UTC (permalink / raw)
To: gcc-bugs
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;
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/52849] crash when using suscript operator in delctype argument
2012-04-03 18:25 [Bug c++/52849] New: crash when using suscript operator in delctype argument freunddeslichts at web dot de
@ 2012-04-03 18:26 ` freunddeslichts at web dot de
2012-04-04 11:43 ` daniel.kruegler at googlemail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: freunddeslichts at web dot de @ 2012-04-03 18:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52849
--- Comment #1 from freunddeslichts at web dot de 2012-04-03 18:25:46 UTC ---
Created attachment 27078
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27078
testcase
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/52849] crash when using suscript operator in delctype argument
2012-04-03 18:25 [Bug c++/52849] New: crash when using suscript operator in delctype argument freunddeslichts at web dot de
2012-04-03 18:26 ` [Bug c++/52849] " freunddeslichts at web dot de
@ 2012-04-04 11:43 ` daniel.kruegler at googlemail dot com
2012-04-16 21:28 ` [Bug c++/52849] crash when using subscript operator in decltype argument paolo.carlini at oracle dot com
2012-04-16 21:28 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2012-04-04 11:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52849
Daniel Krügler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler at
| |googlemail dot com
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-04-04 11:43:22 UTC ---
This example causes no error in gcc 4.8.0 20120311 (experimental)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/52849] crash when using subscript operator in decltype argument
2012-04-03 18:25 [Bug c++/52849] New: crash when using suscript operator in delctype argument freunddeslichts at web dot de
` (2 preceding siblings ...)
2012-04-16 21:28 ` [Bug c++/52849] crash when using subscript operator in decltype argument paolo.carlini at oracle dot com
@ 2012-04-16 21:28 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-16 21:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52849
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-16 21:27:18 UTC ---
Really, 4.4.x is very old, especially in terms of C++11 features. Current
mainline, 4.7.0 and 4.6.x have no problems with the testcase.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/52849] crash when using subscript operator in decltype argument
2012-04-03 18:25 [Bug c++/52849] New: crash when using suscript operator in delctype argument freunddeslichts at web dot de
2012-04-03 18:26 ` [Bug c++/52849] " freunddeslichts at web dot de
2012-04-04 11:43 ` daniel.kruegler at googlemail dot com
@ 2012-04-16 21:28 ` paolo.carlini at oracle dot com
2012-04-16 21:28 ` paolo.carlini at oracle dot com
3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-04-16 21:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52849
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WORKSFORME
--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-16 21:27:43 UTC ---
.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-04-16 21:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-03 18:25 [Bug c++/52849] New: crash when using suscript operator in delctype argument freunddeslichts at web dot de
2012-04-03 18:26 ` [Bug c++/52849] " freunddeslichts at web dot de
2012-04-04 11:43 ` daniel.kruegler at googlemail dot com
2012-04-16 21:28 ` [Bug c++/52849] crash when using subscript operator in decltype argument paolo.carlini at oracle dot com
2012-04-16 21:28 ` paolo.carlini at oracle dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).