On 8/5/21 5:39 PM, Segher Boessenkool wrote:
On Thu, Aug 05, 2021 at 02:05:24PM +0200, Martin Liška wrote:
On 7/23/21 7:57 PM, Segher Boessenkool wrote:
Hi!

On Fri, Jul 23, 2021 at 07:47:54AM +0200, Martin Liška wrote:
On 7/12/21 7:20 PM, Segher Boessenkool wrote:
+static __attribute__ ((optimize ("-fno-stack-protector"))) __typeof
(f) *

-fno-stack-protector is default.

Yes, but one needs an optimize attribute in order to trigger
cl_target_option_save/restore
mechanism.

So it behaves differently if you select the default than if you do not
select anything?  That is wrong, no?

Sorry, I don't get your example, please explain it.

If -mbork is the default, the coompiler whould behave the same if you
invoke it with -mbork as when you do not.  And the optimize attribute
should work exactly the same as command line options.

Ah, got your point. All right, let's use then 'optimize(1)'.

Is it fine with the adjustment?

You are saying the compiler's behaviour is broken, but are changing the
testcase to avoid exhibiting that behaviour?

No, both selections of the 'optimize' attribute trigger the ICE. The reason
is that any optimize attribute triggers eventually cl_target_option_save/restore
mechanism which is what the patch addresses.

No, this is not fine.

If a flag is the default the compiler should do the same thing with and
without any attribute setting that flag, directly or indirectly.

Yes, but should not crash. And that's what is my patch dealing with.

Cheers,
Martin



Segher


Reply via email to