public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/67359] New: struct-layout-1_generate.c undefined behaviour
@ 2015-08-26 13:57 zeccav at gmail dot com
0 siblings, 0 replies; only message in thread
From: zeccav at gmail dot com @ 2015-08-26 13:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67359
Bug ID: 67359
Summary: struct-layout-1_generate.c undefined behaviour
Product: gcc
Version: 5.2.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: testsuite
Assignee: unassigned at gcc dot gnu.org
Reporter: zeccav at gmail dot com
Target Milestone: ---
Running struct-layout-1_generate.c the sanitized version of gcc finds two
undefined statements:
At line 1081
m &= (1ULL << e->len) - 1;
I get
/home/vitti/gcc-5.2.0/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c:1081:13:
runtime error: shift exponent 64 is too large for 64-bit type 'long long
unsigned int'
It seems that e->len == 64 and the shift is too large for 1ULL
At line 1901
&& e[n].type < &complex_attrib_array_types[NAATYPES2])
should be
&& e[n].type < &complex_attrib_array_types[NCAATYPES2])
to avoid
/home/vitti/gcc-5.2.0/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c:1901:51:
runtime error: index 83 out of bounds for type 'types [54]'
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-08-26 13:57 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-26 13:57 [Bug testsuite/67359] New: struct-layout-1_generate.c undefined behaviour zeccav at gmail 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).