[Bug 77580] GCC memory starvation caused by flatten attribute with LTO

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jul 23 19:15:17 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=77580

--- Comment #10 from main.haarp at gmail.com ---
Created attachment 125281
  --> https://bugs.freedesktop.org/attachment.cgi?id=125281&action=edit
pre-processed sources

(In reply to Martin Liška from comment #7)
> I can confirm that the attached patch helps to build the project with LTO
> enabled. I tried both 5.3.1 and latest trunk (7.0.0) and both work fine.
> 
> Can you please attach pre-processed source code for the issue:
> /usr/include/bits/string3.h:50:1: error: inlining failed in call to
> always_inline ‘memcpy’: target specific option mismatch
> 
> and also command line arguments for GCC.
> 
> Thanks

Here are the command line arguments and the full error log.

-------------------------

gcc-5.4.0 -DHAVE_CONFIG_H -I.
-I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna
-I../.. -Wall -Wpointer-arith -Wmissing-declarations -Wformat=2
-Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wbad-function-cast
-Wold-style-definition -Wdeclaration-after-statement -Wunused -Wuninitialized
-Wshadow -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls
-Wlogical-op -Werror=implicit -Werror=nonnull -Werror=init-self -Werror=main
-Werror=missing-braces -Werror=sequence-point -Werror=return-type
-Werror=trigraphs -Werror=array-bounds -Werror=write-strings -Werror=address
-Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -fno-strict-aliasing
-I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src
-I/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/render_program
-fvisibility=hidden -I/usr/include/xorg -I/usr/include/X11/dri
-I/usr/include/libdrm -I/usr/include/pixman-1 -I/usr/include/libdrm
-Wno-cast-qual -Wno-redundant-decls -Wno-maybe-uninitialized -march=native -O2
-pipe -fno-stack-protector -flto=4 -c
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c

In file included from /usr/include/features.h:365:0,
                 from /usr/include/stdint.h:25,
                 from
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/stdint.h:9,
                 from
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna.h:40,
                 from
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:32:
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:
In function ‘to_memcpy’:
/usr/include/bits/string3.h:50:1: error: inlining failed in call to
always_inline ‘memcpy’: target specific option mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:490:4:
error: called from here
    memcpy(dst, src, len);
    ^
In file included from /usr/include/features.h:365:0,
                 from /usr/include/stdint.h:25,
                 from
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/stdint.h:9,
                 from
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna.h:40,
                 from
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:32:
/usr/include/bits/string3.h:50:1: error: inlining failed in call to
always_inline ‘memcpy’: target specific option mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:555:2:
error: called from here
  memcpy(dst, src, len & 3);
  ^
In file included from /usr/include/features.h:365:0,
                 from /usr/include/stdint.h:25,
                 from
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/stdint.h:9,
                 from
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna.h:40,
                 from
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:32:
/usr/include/bits/string3.h:50:1: error: inlining failed in call to
always_inline ‘memcpy’: target specific option mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:490:4:
error: called from here
    memcpy(dst, src, len);
    ^
In file included from /usr/include/features.h:365:0,
                 from /usr/include/stdint.h:25,
                 from
/usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/stdint.h:9,
                 from
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/sna.h:40,
                 from
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:32:
/usr/include/bits/string3.h:50:1: error: inlining failed in call to
always_inline ‘memcpy’: target specific option mismatch
 __NTH (memcpy (void *__restrict __dest, const void *__restrict __src,
 ^
/var/tmp/portage/x11-drivers/xf86-video-intel-9999/work/xf86-video-intel-9999/src/sna/blt.c:555:2:
error: called from here
  memcpy(dst, src, len & 3);
  ^
Makefile:655: recipe for target 'blt.lo' failed

-----------------------------------

Attached is what gcc generates with -E, I think that's what you needed,
correct?

Thanks!

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20160723/665647bd/attachment-0001.html>


More information about the intel-gfx-bugs mailing list