This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/66626] [i386] gcc.dg/torture/stackalign/non-local-goto-5.c segfaults w/ -mregparm=3


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

UroÅ Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-06-23
     Ever confirmed|0                           |1

--- Comment #1 from UroÅ Bizjak <ubizjak at gmail dot com> ---
Confirmed, reduced testcase:

--cut here--
extern void abort (void);

int s (int i)
{
  __label__ l1;
  int f (int i)
  {
    if (i == 2)
      goto l1;
    return 0;
  }
  return f (i);
 l1:;
  return 1;
}

int main ()
{
  if (s (2) != 1)
    abort ();

  return 0;
}
--cut here--

$ gcc -O2 -mregparm=3 -m32 t.c
$ ./a.out
Segmentation fault (core dumped)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]