This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/77646] [5/6/7 Regression] GCC Segfault with -O3
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Sep 2016 15:05:54 +0000
- Subject: [Bug tree-optimization/77646] [5/6/7 Regression] GCC Segfault with -O3
- Auto-submitted: auto-generated
- References: <bug-77646-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77646
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |trippels at gcc dot gnu.org
Known to work| |4.9.4
Summary|GCC Segfault with -O3 |[5/6/7 Regression] GCC
| |Segfault with -O3
Known to fail| |5.4.0, 6.2.0, 7.0
--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
struct ccl_iterator_ccl_pointer_iterator_st {
int (*has_more_elements)();
void (*next_element)();
} * c;
int a;
void *ccl_real_calloc();
typedef struct {
struct ccl_iterator_ccl_pointer_iterator_st super;
} poset_iterator;
int s_poset_iterator_has_more_elements() { return a; }
const struct ccl_iterator_ccl_pointer_iterator_st b = {
s_poset_iterator_has_more_elements};
void ar_poset_log() {
poset_iterator *d = ccl_real_calloc();
d->super = b;
c = (struct ccl_iterator_ccl_pointer_iterator_st *)d;
struct ccl_iterator_ccl_pointer_iterator_st *i = c;
if (i->has_more_elements(c))
while (i->has_more_elements(c))
i->next_element();
}