Re: m68k: Simple loop compiles into boundless recursion with -O2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 14 Jan 2021, Fredrik Noring wrote:

> > __attribute__((optimize("no-tree-loop-distribute-patterns"))) 
> > void *memset2(void *s, int c, unsigned int n)
> > {
> > ...
> 
> This works, too, and I prefer it because the __attribute__ is attached
> to the code itself.

Just keep in mind that this attribute is currently not intended for use
apart from debugging/testing:

https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-optimize-function-attribute

  The optimize attribute should be used for debugging purposes only. It is not
  suitable in production code.

Alexander



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux