Re: Crash when cross compiling for ARM with GCC-8-2-0 and -ftree-loop-distribute-patterns

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

 



On Fri, Oct 18, 2019 at 11:25:53AM +0100, Richard Earnshaw (lists) wrote:
>
> void *
> __attribute__ ((__optimize__ ("-fno-tree-loop-distribute-patterns")))
> memset (void *s, int c, size_t n)
> {
>   int i;
>   for (i=0; i<n; i++)
>     ((char *)s)[i] = c;
> 
>   return s;
> }

Wouldn't

   void *memset (void *s, int c, size_t n)
   {
           return __builtin_memset (s, c, n);
   }

be a cleaner solution to this?

Unfortunately, this compiles to a jump to itself. No matter whether I use the
-fno-builtin-memset flag or not.

-- 
Josef Wolf
jw@xxxxxxxxxxxxx



[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