public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "zeccav at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/62058] New: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize Date: Fri, 08 Aug 2014 08:05:00 -0000 [thread overview] Message-ID: <bug-62058-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62058 Bug ID: 62058 Summary: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com /* from testsuite p60183.c */ /* gcc 4.9.1 -S -O1 -ftree-loop-vectorize */ /* ../../gcc-4.9.1/gcc/tree-data-ref.c:2423:16: runtime error: signed integer overflow: 65536 * -65536 cannot be represented in type 'int' */ /* ../../gcc-4.9.1/gcc/tree-data-ref.c:2334:38: runtime error: signed integer overflow: 1073741824 + 1073741824 cannot be represented in type 'int' */ /* ../../gcc-4.9.1/gcc/tree-data-ref.c:2425:16: runtime error: negation of -2147483648 (INT_MIN) cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself */ /* ../../gcc-4.9.1/gcc/tree-data-ref.c:2424:16: runtime error: negation of -2147483648 (INT_MIN) cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself */ /* on x86-64 from testsuite pr60183.c */ unsigned char c[0x30001] = { 1 }; int j = 0; /* independent of the j initialization value */ static void foo (unsigned long *x, unsigned char *y) { int i; unsigned long w = x[0]; for (i = 0; i < j; i++) { w += *y; y += 0x10000; w += *y; } x[1] = w; } void bar (unsigned long *x) { foo (x, c); }
next reply other threads:[~2014-08-08 8:05 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-08-08 8:05 zeccav at gmail dot com [this message] 2014-09-04 10:19 ` [Bug tree-optimization/62058] " mpolacek at gcc dot gnu.org 2014-10-30 10:42 ` jakub at gcc dot gnu.org 2015-06-26 20:07 ` jakub at gcc dot gnu.org 2015-06-26 20:35 ` jakub at gcc dot gnu.org 2015-06-26 21:20 ` pinskia at gcc dot gnu.org 2015-08-24 12:12 ` zeccav at gmail dot com 2021-02-27 9:34 ` zeccav at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-62058-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).