public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug gcov-profile/39732] New: -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy
@ 2009-04-10 22:21 zlynx at acm dot org
2009-04-10 22:24 ` [Bug gcov-profile/39732] " zlynx at acm dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: zlynx at acm dot org @ 2009-04-10 22:21 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
g++ -O1 -fprofile-generate gcc-bug/test-case.ii
gcc-bug/test-case.cpp: In function int f(const int*):
gcc-bug/test-case.cpp:14: error: address taken, but ADDRESSABLE bit not set
D.27568
gcc-bug/test-case.cpp:14: note: in statement
D.27611 = &D.27568;
gcc-bug/test-case.cpp:14: internal compiler error: verify_stmts failed
It is very simple code that I have used in C++ for a long time.
Like this:
std::copy(&array[0], &array[5], ostream_iterator<int>(cout, "\n");
I accidentally built GCC 4.5.0 from SVN instead of 4.4 (it branched when I
wasn't looking) and hit this bug.
It only seems to happen with optimization and profile generation. -O1
-fprofile-generate will trigger it. -O3 without profiling will not.
I have not tried to reproduce with GCC 4.4 or GCC 4.5 on i686 or x86_64.
Preprocessed source will be attached.
--
Summary: -fprofile-generate -O1: ICE: verify_stmts failed,
ADDRESSABLE bit not set on pointers passed to std::copy
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: gcov-profile
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zlynx at acm dot org
GCC host triplet: ia64-redhat-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39732
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gcov-profile/39732] -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy
2009-04-10 22:21 [Bug gcov-profile/39732] New: -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy zlynx at acm dot org
@ 2009-04-10 22:24 ` zlynx at acm dot org
2009-04-11 7:47 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: zlynx at acm dot org @ 2009-04-10 22:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from zlynx at acm dot org 2009-04-10 22:22 -------
Created an attachment (id=17615)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17615&action=view)
preprocessed C++ test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39732
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug gcov-profile/39732] -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy
2009-04-10 22:21 [Bug gcov-profile/39732] New: -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy zlynx at acm dot org
2009-04-10 22:24 ` [Bug gcov-profile/39732] " zlynx at acm dot org
@ 2009-04-11 7:47 ` rguenth at gcc dot gnu dot org
2009-04-11 8:13 ` [Bug middle-end/39732] [4.5 Regression] " rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-11 7:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2009-04-11 07:47 -------
Reducing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39732
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/39732] [4.5 Regression] -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy
2009-04-10 22:21 [Bug gcov-profile/39732] New: -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy zlynx at acm dot org
2009-04-10 22:24 ` [Bug gcov-profile/39732] " zlynx at acm dot org
2009-04-11 7:47 ` rguenth at gcc dot gnu dot org
@ 2009-04-11 8:13 ` rguenth at gcc dot gnu dot org
2009-04-11 10:20 ` rguenth at gcc dot gnu dot org
2009-04-11 10:20 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-11 8:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2009-04-11 08:13 -------
template<class _CharT> struct char_traits;
template<typename _OI>
_OI __copy_move_a2(_OI __result);
template<typename _OI> inline _OI
copy(_OI __result)
{
return __copy_move_a2 (__result);
}
template<typename _CharT, typename _Traits>
class basic_ostream { };
template<typename _Tp, typename _CharT = char,
typename _Traits = char_traits<_CharT> >
class ostream_iterator {
typedef basic_ostream<_CharT, _Traits> ostream_type;
ostream_type* _M_stream;
const _CharT* _M_string;
public:
ostream_iterator(ostream_type& __s, const _CharT* __c)
: _M_stream(&__s), _M_string(__c) { }
ostream_iterator(const ostream_iterator& __obj)
: _M_stream(__obj._M_stream), _M_string(__obj._M_string) { }
};
int f(void)
{
basic_ostream<char, char_traits<char> > os;
copy(ostream_iterator<const int>(os, ","));
}
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Component|gcov-profile |middle-end
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2009-04-11 08:13:13
date| |
Summary|-fprofile-generate -O1: ICE:|[4.5 Regression] -fprofile-
|verify_stmts failed, |generate -O1: ICE:
|ADDRESSABLE bit not set on |verify_stmts failed,
|pointers passed to std::copy|ADDRESSABLE bit not set on
| |pointers passed to std::copy
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39732
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/39732] [4.5 Regression] -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy
2009-04-10 22:21 [Bug gcov-profile/39732] New: -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy zlynx at acm dot org
` (2 preceding siblings ...)
2009-04-11 8:13 ` [Bug middle-end/39732] [4.5 Regression] " rguenth at gcc dot gnu dot org
@ 2009-04-11 10:20 ` rguenth at gcc dot gnu dot org
2009-04-11 10:20 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-11 10:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2009-04-11 10:20 -------
Subject: Bug 39732
Author: rguenth
Date: Sat Apr 11 10:19:55 2009
New Revision: 145954
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145954
Log:
2009-04-11 Richard Guenther <rguenther@suse.de>
PR middle-end/39732
* tree-inline.c (declare_return_variable): Mark DECL_BY_REFERENCE
return variables as TREE_ADDRESSABLE.
* g++.dg/torture/pr39732.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr39732.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-inline.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39732
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug middle-end/39732] [4.5 Regression] -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy
2009-04-10 22:21 [Bug gcov-profile/39732] New: -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy zlynx at acm dot org
` (3 preceding siblings ...)
2009-04-11 10:20 ` rguenth at gcc dot gnu dot org
@ 2009-04-11 10:20 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-11 10:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2009-04-11 10:20 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39732
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-04-11 10:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-10 22:21 [Bug gcov-profile/39732] New: -fprofile-generate -O1: ICE: verify_stmts failed, ADDRESSABLE bit not set on pointers passed to std::copy zlynx at acm dot org
2009-04-10 22:24 ` [Bug gcov-profile/39732] " zlynx at acm dot org
2009-04-11 7:47 ` rguenth at gcc dot gnu dot org
2009-04-11 8:13 ` [Bug middle-end/39732] [4.5 Regression] " rguenth at gcc dot gnu dot org
2009-04-11 10:20 ` rguenth at gcc dot gnu dot org
2009-04-11 10:20 ` rguenth at gcc dot gnu dot org
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).