Re: Optimize even more (for speed) [-02] - run-time error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Optimize even more (for speed) [-02] - run-time error

Domonic Tom

I'm using MinGW compiler 4.7.1 (Even tried 4.8.1) and am getting a strange error,,, for Release Versions only when  I use the this compiler flag Optimize even more (for speed) [-02].

It's always a fatal error, but only when this option in ticked in my Code::Blocks IDE.  Actually, any Optimization flags [-02], [-01], or [-0], I get this problem.

The error seems to be SIGSEGV, segmentation fault but I the code is definitely correct and runs fine when I don't use this flag.  

Is there a common reason why this is causing a problem?  What would the reason be?

Thanks

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Optimize even more (for speed) [-02] - run-time error

Eli Zaretskii
> From: Domonic Tom <[hidden email]>
> Date: Wed, 16 Jul 2014 00:19:41 +0930
>
> I'm using MinGW compiler 4.7.1 (Even tried 4.8.1) and am getting a strange error,,, for Release Versions only when  I use the this compiler flag Optimize even more (for speed) [-02].
> It's always a fatal error, but only when this option in ticked in my Code::Blocks IDE.  Actually, any Optimization flags [-02], [-01], or [-0], I get this problem.
> The error seems to be SIGSEGV, segmentation fault but I the code is definitely correct and runs fine when I don't use this flag.  
> Is there a common reason why this is causing a problem?  What would the reason be?

Most probably a compiler bug.  But it could also be that your code is
buggy, and that triggers the bug in the compiler.

Try rearranging the code into something equivalent, perhaps using
intermediate variables and simpler syntax.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Optimize even more (for speed) [-02] - run-time error

KHMan
On 7/15/2014 11:06 PM, Eli Zaretskii wrote:

>> From: Domonic Tom
>> Date: Wed, 16 Jul 2014 00:19:41 +0930
>>
>> I'm using MinGW compiler 4.7.1 (Even tried 4.8.1) and am getting a strange error,,, for Release Versions only when  I use the this compiler flag Optimize even more (for speed) [-02].
>> It's always a fatal error, but only when this option in ticked in my Code::Blocks IDE.  Actually, any Optimization flags [-02], [-01], or [-0], I get this problem.
>> The error seems to be SIGSEGV, segmentation fault but I the code is definitely correct and runs fine when I don't use this flag.
>> Is there a common reason why this is causing a problem?  What would the reason be?
>
> Most probably a compiler bug.  But it could also be that your code is
> buggy, and that triggers the bug in the compiler.
>
> Try rearranging the code into something equivalent, perhaps using
> intermediate variables and simpler syntax.

Nope, he put a zero there, look closely...

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Optimize even more (for speed) [-02] - run-time error

Eli Zaretskii
> Date: Wed, 16 Jul 2014 00:04:28 +0800
> From: KHMan <[hidden email]>
>
> On 7/15/2014 11:06 PM, Eli Zaretskii wrote:
> >> From: Domonic Tom
> >> Date: Wed, 16 Jul 2014 00:19:41 +0930
> >>
> >> I'm using MinGW compiler 4.7.1 (Even tried 4.8.1) and am getting a strange error,,, for Release Versions only when  I use the this compiler flag Optimize even more (for speed) [-02].
> >> It's always a fatal error, but only when this option in ticked in my Code::Blocks IDE.  Actually, any Optimization flags [-02], [-01], or [-0], I get this problem.
> >> The error seems to be SIGSEGV, segmentation fault but I the code is definitely correct and runs fine when I don't use this flag.
> >> Is there a common reason why this is causing a problem?  What would the reason be?
> >
> > Most probably a compiler bug.  But it could also be that your code is
> > buggy, and that triggers the bug in the compiler.
> >
> > Try rearranging the code into something equivalent, perhaps using
> > intermediate variables and simpler syntax.
>
> Nope, he put a zero there, look closely...

That still doesn't explain the segfault.  When I try that, GCC just
says unrecognized option.

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Optimize even more (for speed) [-02] - run-time error

KHMan
On 7/16/2014 12:16 AM, Eli Zaretskii wrote:

>> Date: Wed, 16 Jul 2014 00:04:28 +0800
>> From: KHMan <[hidden email]>
>>
>> On 7/15/2014 11:06 PM, Eli Zaretskii wrote:
>>>> From: Domonic Tom
>>>> Date: Wed, 16 Jul 2014 00:19:41 +0930
>>>>
>>>> I'm using MinGW compiler 4.7.1 (Even tried 4.8.1) and am getting a strange error,,, for Release Versions only when  I use the this compiler flag Optimize even more (for speed) [-02].
>>>> It's always a fatal error, but only when this option in ticked in my Code::Blocks IDE.  Actually, any Optimization flags [-02], [-01], or [-0], I get this problem.
>>>> The error seems to be SIGSEGV, segmentation fault but I the code is definitely correct and runs fine when I don't use this flag.
>>>> Is there a common reason why this is causing a problem?  What would the reason be?
>>>
>>> Most probably a compiler bug.  But it could also be that your code is
>>> buggy, and that triggers the bug in the compiler.
>>>
>>> Try rearranging the code into something equivalent, perhaps using
>>> intermediate variables and simpler syntax.
>>
>> Nope, he put a zero there, look closely...
>
> That still doesn't explain the segfault.  When I try that, GCC just
> says unrecognized option.

Not enough info to diagnose anyway. *shrug*

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe