public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Runtime SEGV from gcc -O3 -march=native
@ 2010-07-23  3:59 Joseph Quinsey
  2010-07-23  8:11 ` Yaakov (Cygwin/X)
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph Quinsey @ 2010-07-23  3:59 UTC (permalink / raw)
  To: cygwin

FYI. Source code:

int main(void) {
    static int foo[4];
    int bar[4];
    int i;
    for (i = 0; i < 4; i++)
        foo[i] = bar[i];
    return 0;
}

Compile and run, using Cygwin's current gcc version 4.3.4: 

    gcc -O3 -march=native foobar.c
    a.exe
    Segmentation fault (core dumped)

I've submitted a bug report to gcc, and it has been flagged as a duplicate
of the 2008 report: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Runtime SEGV from gcc -O3 -march=native
  2010-07-23  3:59 Runtime SEGV from gcc -O3 -march=native Joseph Quinsey
@ 2010-07-23  8:11 ` Yaakov (Cygwin/X)
  0 siblings, 0 replies; 4+ messages in thread
From: Yaakov (Cygwin/X) @ 2010-07-23  8:11 UTC (permalink / raw)
  To: cygwin

On Thu, 2010-07-22 at 22:16 -0400, Joseph Quinsey wrote:
> I've submitted a bug report to gcc, and it has been flagged as a duplicate
> of the 2008 report: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216

It is indicated there that this has been fixed for gcc-4.5, which should
be available soon for Cygwin.  I can confirm that is is fixed in my
mingw builds of the latest 4.5 snapshots.


Yaakov



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Runtime SEGV from gcc -O3 -march=native
  2010-07-26 16:23 Joseph Quinsey
@ 2010-07-27  3:00 ` Huang Bambo
  0 siblings, 0 replies; 4+ messages in thread
From: Huang Bambo @ 2010-07-27  3:00 UTC (permalink / raw)
  To: cygwin

Use -O2 instead, I also have trouble on use -O3.

2010/7/27 Joseph Quinsey <jquinsey@entrenet.com>:
> Again, just FYI, with a simpler example, and with -march=native replaced by
> k8 or athlon64.
>
> Source code:
>
> int main(void) {
>    static int foo[4];
>    int i;
>    for (i = 0; i < 4; i++)
>        foo[i] = 0;
>    return 0;
> }
>
> Compile and run, using Cygwin's current gcc version 4.3.4:
>
>    gcc -O3 -march=athlon64 foobar.c
>    ./a.exe
>    Segmentation fault (core dumped)
>
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* RE: Runtime SEGV from gcc -O3 -march=native
@ 2010-07-26 16:23 Joseph Quinsey
  2010-07-27  3:00 ` Huang Bambo
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph Quinsey @ 2010-07-26 16:23 UTC (permalink / raw)
  To: cygwin

Again, just FYI, with a simpler example, and with -march=native replaced by
k8 or athlon64.

Source code:

int main(void) {
    static int foo[4];
    int i;
    for (i = 0; i < 4; i++)
        foo[i] = 0;
    return 0;
}

Compile and run, using Cygwin's current gcc version 4.3.4: 

    gcc -O3 -march=athlon64 foobar.c
    ./a.exe
    Segmentation fault (core dumped)


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2010-07-26 23:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23  3:59 Runtime SEGV from gcc -O3 -march=native Joseph Quinsey
2010-07-23  8:11 ` Yaakov (Cygwin/X)
2010-07-26 16:23 Joseph Quinsey
2010-07-27  3:00 ` Huang Bambo

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