public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/61944] New: loop-iv.c:2610 signed integer overflow
@ 2014-07-29  7:03 zeccav at gmail dot com
  2014-09-04 10:18 ` [Bug rtl-optimization/61944] " mpolacek at gcc dot gnu.org
  2014-09-28  9:09 ` trippels at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: zeccav at gmail dot com @ 2014-07-29  7:03 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61944
           Summary: loop-iv.c:2610 signed integer overflow
           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 pr42049.c
// gcc -funroll-loops -O
// ../../gcc-4.9.1/gcc/loop-iv.c:2610:14: runtime error: 
// signed integer overflow: 7 - -9223372036854775808 cannot be represented in
type 'long int'
// "max = (up - down) / inc + 1;"
extern char *strcpy (char *s1, const char *s2);
struct S { char s[4]; };

int
foo (int x, char **y)
{
  struct S s[9];
  long i;
  for (i = 2; i  && i < 8; i++)
    strcpy (s[i].s, y[i + 1]);
}


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

* [Bug rtl-optimization/61944] loop-iv.c:2610 signed integer overflow
  2014-07-29  7:03 [Bug c/61944] New: loop-iv.c:2610 signed integer overflow zeccav at gmail dot com
@ 2014-09-04 10:18 ` mpolacek at gcc dot gnu.org
  2014-09-28  9:09 ` trippels at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-09-04 10:18 UTC (permalink / raw)
  To: gcc-bugs

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

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 u.c -funroll-loops -O
/home/polacek/src/gcc/gcc/loop-iv.c:2643:14: runtime error: signed integer
overflow: 7 - -9223372036854775808 cannot be represented in type 'long int'

Confirmed.


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

* [Bug rtl-optimization/61944] loop-iv.c:2610 signed integer overflow
  2014-07-29  7:03 [Bug c/61944] New: loop-iv.c:2610 signed integer overflow zeccav at gmail dot com
  2014-09-04 10:18 ` [Bug rtl-optimization/61944] " mpolacek at gcc dot gnu.org
@ 2014-09-28  9:09 ` trippels at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-09-28  9:09 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |trippels at gcc dot gnu.org
         Resolution|---                         |DUPLICATE

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
dup.

*** This bug has been marked as a duplicate of bug 61657 ***


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

end of thread, other threads:[~2014-09-28  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-29  7:03 [Bug c/61944] New: loop-iv.c:2610 signed integer overflow zeccav at gmail dot com
2014-09-04 10:18 ` [Bug rtl-optimization/61944] " mpolacek at gcc dot gnu.org
2014-09-28  9:09 ` trippels at gcc dot gnu.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).