public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/62058] New: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize
@ 2014-08-08  8:05 zeccav at gmail dot com
  2014-09-04 10:19 ` [Bug tree-optimization/62058] " mpolacek at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zeccav at gmail dot com @ 2014-08-08  8:05 UTC (permalink / raw)
  To: gcc-bugs

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);
}


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/62058] Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize
  2014-08-08  8:05 [Bug c/62058] New: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize zeccav at gmail dot com
@ 2014-09-04 10:19 ` mpolacek at gcc dot gnu.org
  2014-10-30 10:42 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-09-04 10:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62058

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-09-04
   Target Milestone|---                         |4.9.2
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
$ ./xgcc -B./ -c o.c -O -ftree-loop-vectorize
/home/polacek/src/gcc/gcc/tree-data-ref.c:2440:16: runtime error: signed
integer overflow: 65536 * -65536 cannot be represented in type 'int'
/home/polacek/src/gcc/gcc/tree-data-ref.c:2351:38: runtime error: signed
integer overflow: 1073741824 + 1073741824 cannot be represented in type 'int'
/home/polacek/src/gcc/gcc/tree-data-ref.c:2442:16: runtime error: negation of
-2147483648 cannot be represented in type 'int'; cast to an unsigned type to
negate this value to itself
/home/polacek/src/gcc/gcc/tree-data-ref.c:2441:16: runtime error: negation of
-2147483648 cannot be represented in type 'int'; cast to an unsigned type to
negate this value to itself

Confirmed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/62058] Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize
  2014-08-08  8:05 [Bug c/62058] New: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize zeccav at gmail dot com
  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
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-10-30 10:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62058

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.2                       |4.9.3

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.2 has been released.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/62058] Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize
  2014-08-08  8:05 [Bug c/62058] New: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize zeccav at gmail dot com
  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
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62058

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/62058] Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize
  2014-08-08  8:05 [Bug c/62058] New: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize zeccav at gmail dot com
                   ` (2 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62058

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |4.9.4


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/62058] Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize
  2014-08-08  8:05 [Bug c/62058] New: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize zeccav at gmail dot com
                   ` (3 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-06-26 21:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62058

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.4                       |---


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/62058] Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize
  2014-08-08  8:05 [Bug c/62058] New: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize zeccav at gmail dot com
                   ` (4 preceding siblings ...)
  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
  6 siblings, 0 replies; 8+ messages in thread
From: zeccav at gmail dot com @ 2015-08-24 12:12 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62058

--- Comment #4 from Vittorio Zecca <zeccav at gmail dot com> ---
Still there in GCC 5.2.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/62058] Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize
  2014-08-08  8:05 [Bug c/62058] New: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize zeccav at gmail dot com
                   ` (5 preceding siblings ...)
  2015-08-24 12:12 ` zeccav at gmail dot com
@ 2021-02-27  9:34 ` zeccav at gmail dot com
  6 siblings, 0 replies; 8+ messages in thread
From: zeccav at gmail dot com @ 2021-02-27  9:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62058

Vittorio Zecca <zeccav at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #7 from Vittorio Zecca <zeccav at gmail dot com> ---
Fixed in current runk.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-27  9:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-08  8:05 [Bug c/62058] New: Undefined behaviour in tree-data-ref.c with options -O1 -ftree-loop-vectorize zeccav at gmail dot com
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

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).