From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97079 invoked by alias); 23 Aug 2015 15:33:43 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 97047 invoked by uid 48); 23 Aug 2015 15:33:39 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug pch/64117] warning control #pragmas in precompiled headers are not obeyed for template code Date: Sun, 23 Aug 2015 15:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: pch X-Bugzilla-Version: 4.9.2 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords bug_status cf_reconfirmed_on cc component everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01594.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64117 Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic Status|UNCONFIRMED |NEW Last reconfirmed| |2015-08-23 CC| |manu at gcc dot gnu.org Component|c++ |pch Ever confirmed|0 |1 --- Comment #3 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- I can confirm this with GCC 6. I'm not sure if the pragmas are even saved in the pch file. Someone would need to debug what is happening. >>From gcc-bugs-return-495453-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Aug 23 15:35:41 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 98436 invoked by alias); 23 Aug 2015 15:35:41 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 98394 invoked by uid 48); 23 Aug 2015 15:35:37 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/67330] ICE handling weak attributes Date: Sun, 23 Aug 2015 15:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01595.txt.bz2 Content-length: 2262 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67330 Markus Trippelsdorf changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-08-23 CC| |hubicka at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #2 from Markus Trippelsdorf --- Doesn't happen with --enable-checking=3Drelease. markus@x4 tmp % cat core.i void fn1 (void) { __attribute__ ((weak)) int a; } markus@x4 tmp % gcc -c core.i core.i: In function =E2=80=98fn1=E2=80=99: core.i:3:30: error: weak declaration of =E2=80=98a=E2=80=99 must be public __attribute__ ((weak)) int a; ^ markus@x4 tmp % /var/tmp/gcc_test/usr/local/bin/gcc -c core.i core.i: In function =E2=80=98fn1=E2=80=99: core.i:3:3: internal compiler error: in get, at cgraph.h:371 __attribute__ ((weak)) int a; ^ 0x62f80c symtab_node::get(tree_node const*) ../../gcc/gcc/cgraph.h:368 0x62f80c handle_weak_attribute ../../gcc/gcc/c-family/c-common.c:8332 0x5a966a decl_attributes(tree_node**, tree_node*, int) ../../gcc/gcc/attribs.c:557 0x5c5674 start_decl(c_declarator*, c_declspecs*, bool, tree_node*) ../../gcc/gcc/c/c-decl.c:4547 0x6174e0 c_parser_declaration_or_fndef ../../gcc/gcc/c/c-parser.c:1830 0x61bb2d c_parser_compound_statement_nostart ../../gcc/gcc/c/c-parser.c:4622 0x61bf9e c_parser_compound_statement ../../gcc/gcc/c/c-parser.c:4533 0x617f88 c_parser_declaration_or_fndef ../../gcc/gcc/c/c-parser.c:1966 0x622107 c_parser_external_declaration ../../gcc/gcc/c/c-parser.c:1436 0x6229c9 c_parser_translation_unit ../../gcc/gcc/c/c-parser.c:1323 0x6229c9 c_parse_file() ../../gcc/gcc/c/c-parser.c:15449 0x67e642 c_common_parse_file() ../../gcc/gcc/c-family/c-opts.c:1058 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. >>From gcc-bugs-return-495454-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Aug 23 16:27:53 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 47603 invoked by alias); 23 Aug 2015 16:27:52 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 47535 invoked by uid 48); 23 Aug 2015 16:27:47 -0000 From: "sasha.levin at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/67330] ICE handling weak attributes Date: Sun, 23 Aug 2015 16:27:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: sasha.levin at oracle dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01596.txt.bz2 Content-length: 10707 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D67330 --- Comment #3 from Sasha Levin --- This is the -v invocation: Using built-in specs. COLLECT_GCC=3Dgcc Target: x86_64-pc-linux-gnu Configured with: ../configure --prefix=3D/home/sasha/gcc-inst/ --with-arch= =3Dnative --with-tune=3Dnative --enable-languages=3Dc --enable-lto --enable-gold --enable-stage1-languages=3Dc Thread model: posix gcc version 6.0.0 20150823 (experimental) (GCC)=20 COLLECT_GCC_OPTIONS=3D'-v' '-nostdinc' '-isystem' '/home/sasha/gcc-inst/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include' '-I' './arch/x86/include' '-I' 'arch/x86/include/generated/uapi' '-I' 'arch/x86/include/generated' '-I' 'include' '-I' './arch/x86/include/uapi' = '-I' 'arch/x86/include/generated/uapi' '-I' './include/uapi' '-I' 'include/generated/uapi' '-include' './include/linux/kconfig.h' '-D' '__KERNEL__' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wno-trigraphs' '-fno-strict-aliasing' '-fno-common' '-Werror=3Dimplicit-function-declarati= on' '-Wno-format-security' '-std=3Dgnu90' '-mno-sse' '-mno-mmx' '-mno-sse2' '-mno-3dnow' '-mno-avx' '-m64' '-falign-jumps=3D1' '-falign-loops=3D1' '-mn= o-80387' '-mno-fp-ret-in-387' '-mpreferred-stack-boundary=3D3' '-mskip-rax-setup' '-march=3Dnative' '-mno-red-zone' '-mcmodel=3Dkernel' '-funit-at-a-time' '-maccumulate-outgoing-args' '-D' 'CONFIG_X86_X32_ABI' '-D' 'CONFIG_AS_FXSAVEQ=3D1' '-D' 'CONFIG_AS_SSSE3=3D1' '-D' 'CONFIG_AS_CRC32=3D= 1' '-D' 'CONFIG_AS_AVX=3D1' '-D' 'CONFIG_AS_AVX2=3D1' '-pipe' '-Wno-sign-compare' '-fno-asynchronous-unwind-tables' '-fno-delete-null-pointer-checks' '-O2' '--param' 'allow-store-data-races=3D0' '-fno-reorder-blocks' '-fno-ipa-cp-c= lone' '-fno-partial-inlining' '-Wframe-larger-than=3D2048' '-fstack-protector' '-Wno-unused-but-set-variable' '-fno-omit-frame-pointer' '-fno-optimize-sibling-calls' '-fno-var-tracking-assignments' '-g' '-gdwarf= -4' '-pg' '-mfentry' '-D' 'CC_USING_FENTRY' '-fno-inline-functions-called-once' '-Wdeclaration-after-statement' '-Wno-pointer-sign' '-fno-strict-overflow' '-fconserve-stack' '-Werror=3Dimplicit-int' '-Werror=3Dstrict-prototypes' '-Werror=3Ddate-time' '-D' 'CC_HAVE_ASM_GOTO' '-fsanitize=3Dkernel-address' '-fasan-shadow-offset=3D0xdffffc0000000000' '--param' 'asan-stack=3D1' '--p= aram' 'asan-globals=3D1' '--param' 'asan-instrumentation-with-call-threshold=3D10= 000' '-D' 'KBUILD_STR(s)=3D#s' '-D' 'KBUILD_BASENAME=3DKBUILD_STR(core)' '-D' 'KBUILD_MODNAME=3DKBUILD_STR(core)' '-c' '-o' 'kernel/sched/.tmp_core.o' /home/sasha/gcc-inst/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/cc1 -quiet -nostdinc -v -I ./arch/x86/include -I arch/x86/include/generated/uapi -I arch/x86/include/generated -I include -I ./arch/x86/include/uapi -I arch/x86/include/generated/uapi -I ./include/uapi -I include/generated/uapi -imultiarch x86_64-linux-gnu -D __KERNEL__ -D CONFIG_X86_X32_ABI -D CONFIG_AS_FXSAVEQ=3D1 -D CONFIG_AS_SSSE3=3D1 -D CONFIG_AS_CRC32=3D1 -D CONFIG_AS_AVX=3D1 -D CONFIG_AS_AVX2=3D1 -D CC_USING_FENTRY -D CC_HAVE_ASM_G= OTO -D KBUILD_STR(s)=3D#s -D KBUILD_BASENAME=3DKBUILD_STR(core) -D KBUILD_MODNAME=3DKBUILD_STR(core) -isystem /home/sasha/gcc-inst/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include -include ./include/linux/kconfig.h -MD kernel/sched/.core.o.d kernel/sched/core.c -march=3Dnehalem -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -mno-sse4a -m= cx16 -msahf -mno-movbe -mno-aes -mno-sha -mno-pclmul -mpopcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -msse4.2 -msse4.1 -mno-lzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mno-prfchw -mno-adx -mfxsr -mno-xsave -mno-xsave= opt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx --param l1-cache-size=3D32 --param l1-cache-line-size=3D64 --pa= ram l2-cache-size=3D24576 -mtune=3Dnehalem -quiet -dumpbase core.c -mno-sse -mn= o-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3D3 -mskip-rax-setup -mno-red-zone -mcmodel=3Dke= rnel -maccumulate-outgoing-args -mfentry -auxbase-strip kernel/sched/.tmp_core.o= -g -gdwarf-4 -O2 -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -Werror=3Dimplicit-function-declaration -Wno-format-security -Wno-sign-comp= are -Wframe-larger-than=3D2048 -Wno-unused-but-set-variable -Wdeclaration-after-statement -Wno-pointer-sign -Werror=3Dimplicit-int -Werror=3Dstrict-prototypes -Werror=3Ddate-time -std=3Dgnu90 -version -p -fno-strict-aliasing -fno-common -falign-jumps=3D1 -falign-loops=3D1 -funit-at-a-time -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -fno-reorder-blocks -fno-ipa-cp-clone -fno-partial-inlining -fstack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -fno-inline-functions-called-once -fno-strict-overflow -fconserve-stack -fsanitize=3Dkernel-address -fasan-shadow-offset=3D0xdffffc0000000000 --par= am allow-store-data-races=3D0 --param asan-stack=3D1 --param asan-globals=3D1 = --param asan-instrumentation-with-call-threshold=3D10000 -o - | as -v -I ./arch/x86/include -I arch/x86/include/generated/uapi -I arch/x86/include/generated -I include -I ./arch/x86/include/uapi -I arch/x86/include/generated/uapi -I ./include/uapi -I include/generated/uapi --64 -o kernel/sched/.tmp_core.o GNU C89 (GCC) version 6.0.0 20150823 (experimental) (x86_64-pc-linux-gnu) compiled by GNU C version 6.0.0 20150823 (experimental), GMP version 5.0.5, MPFR version 3.1.0-p10, MPC version 0.9 GGC heuristics: --param ggc-min-expand=3D30 --param ggc-min-heapsize=3D4096 ignoring duplicate directory "arch/x86/include/generated/uapi" #include "..." search starts here: #include <...> search starts here: ./arch/x86/include arch/x86/include/generated/uapi arch/x86/include/generated include ./arch/x86/include/uapi ./include/uapi include/generated/uapi /home/sasha/gcc-inst/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include End of search list. GNU C89 (GCC) version 6.0.0 20150823 (experimental) (x86_64-pc-linux-gnu) compiled by GNU C version 6.0.0 20150823 (experimental), GMP version 5.0.5, MPFR version 3.1.0-p10, MPC version 0.9 GGC heuristics: --param ggc-min-expand=3D30 --param ggc-min-heapsize=3D4096 GNU assembler version 2.24 (x86_64-linux-gnu) using BFD version (GNU Binuti= ls for Debian) 2.24 Compiler executable checksum: 5d34ea2cdcf90b3d08395d2e098e1d89 kernel/sched/core.c: In function =E2=80=98__schedule=E2=80=99: kernel/sched/core.c:3049:7: warning: unused variable =E2=80=98doit=E2=80=99= [-Wunused-variable] bool doit =3D false; ^ In file included from include/linux/perf_event.h:47:0, from kernel/sched/core.c:41: kernel/sched/core.c: In function =E2=80=98get_parent_ip=E2=80=99: include/linux/ftrace.h:671:36: warning: calling =E2=80=98__builtin_return_a= ddress=E2=80=99 with a nonzero argument is unsafe [-Wframe-address] # define ftrace_return_address(n) __builtin_return_address(n) ^ include/linux/ftrace.h:679:38: note: in expansion of macro =E2=80=98ftrace_return_address=E2=80=99 #define CALLER_ADDR2 ((unsigned long)ftrace_return_address(2)) ^ kernel/sched/core.c:2854:10: note: in expansion of macro =E2=80=98CALLER_AD= DR2=E2=80=99 addr =3D CALLER_ADDR2; ^ include/linux/ftrace.h:671:36: warning: calling =E2=80=98__builtin_return_a= ddress=E2=80=99 with a nonzero argument is unsafe [-Wframe-address] # define ftrace_return_address(n) __builtin_return_address(n) ^ include/linux/ftrace.h:680:38: note: in expansion of macro =E2=80=98ftrace_return_address=E2=80=99 #define CALLER_ADDR3 ((unsigned long)ftrace_return_address(3)) ^ kernel/sched/core.c:2856:11: note: in expansion of macro =E2=80=98CALLER_AD= DR3=E2=80=99 addr =3D CALLER_ADDR3; ^ COMPILER_PATH=3D/home/sasha/gcc-inst/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/= :/home/sasha/gcc-inst/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/:/home/sasha/gc= c-inst/libexec/gcc/x86_64-pc-linux-gnu/:/home/sasha/gcc-inst/lib/gcc/x86_64= -pc-linux-gnu/6.0.0/:/home/sasha/gcc-inst/lib/gcc/x86_64-pc-linux-gnu/ LIBRARY_PATH=3D/home/sasha/gcc-inst/lib/gcc/x86_64-pc-linux-gnu/6.0.0/:/hom= e/sasha/gcc-inst/lib/gcc/x86_64-pc-linux-gnu/6.0.0/../../../../lib64/:/lib/= x86_64-linux-gnu/:/lib/../lib64/:/usr/lib/x86_64-linux-gnu/:/home/sasha/gcc= -inst/lib/gcc/x86_64-pc-linux-gnu/6.0.0/../../../:/lib/:/usr/lib/ COLLECT_GCC_OPTIONS=3D'-v' '-nostdinc' '-isystem' '/home/sasha/gcc-inst/lib/gcc/x86_64-pc-linux-gnu/6.0.0/include' '-I' './arch/x86/include' '-I' 'arch/x86/include/generated/uapi' '-I' 'arch/x86/include/generated' '-I' 'include' '-I' './arch/x86/include/uapi' = '-I' 'arch/x86/include/generated/uapi' '-I' './include/uapi' '-I' 'include/generated/uapi' '-include' './include/linux/kconfig.h' '-D' '__KERNEL__' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wno-trigraphs' '-fno-strict-aliasing' '-fno-common' '-Werror=3Dimplicit-function-declarati= on' '-Wno-format-security' '-std=3Dgnu90' '-mno-sse' '-mno-mmx' '-mno-sse2' '-mno-3dnow' '-mno-avx' '-m64' '-falign-jumps=3D1' '-falign-loops=3D1' '-mn= o-80387' '-mno-fp-ret-in-387' '-mpreferred-stack-boundary=3D3' '-mskip-rax-setup' '-march=3Dnative' '-mno-red-zone' '-mcmodel=3Dkernel' '-funit-at-a-time' '-maccumulate-outgoing-args' '-D' 'CONFIG_X86_X32_ABI' '-D' 'CONFIG_AS_FXSAVEQ=3D1' '-D' 'CONFIG_AS_SSSE3=3D1' '-D' 'CONFIG_AS_CRC32=3D= 1' '-D' 'CONFIG_AS_AVX=3D1' '-D' 'CONFIG_AS_AVX2=3D1' '-pipe' '-Wno-sign-compare' '-fno-asynchronous-unwind-tables' '-fno-delete-null-pointer-checks' '-O2' '--param' 'allow-store-data-races=3D0' '-fno-reorder-blocks' '-fno-ipa-cp-c= lone' '-fno-partial-inlining' '-Wframe-larger-than=3D2048' '-fstack-protector' '-Wno-unused-but-set-variable' '-fno-omit-frame-pointer' '-fno-optimize-sibling-calls' '-fno-var-tracking-assignments' '-g' '-gdwarf= -4' '-pg' '-mfentry' '-D' 'CC_USING_FENTRY' '-fno-inline-functions-called-once' '-Wdeclaration-after-statement' '-Wno-pointer-sign' '-fno-strict-overflow' '-fconserve-stack' '-Werror=3Dimplicit-int' '-Werror=3Dstrict-prototypes' '-Werror=3Ddate-time' '-D' 'CC_HAVE_ASM_GOTO' '-fsanitize=3Dkernel-address' '-fasan-shadow-offset=3D0xdffffc0000000000' '--param' 'asan-stack=3D1' '--p= aram' 'asan-globals=3D1' '--param' 'asan-instrumentation-with-call-threshold=3D10= 000' '-D' 'KBUILD_STR(s)=3D#s' '-D' 'KBUILD_BASENAME=3DKBUILD_STR(core)' '-D' 'KBUILD_MODNAME=3DKBUILD_STR(core)' '-c' '-o' 'kernel/sched/.tmp_core.o' >>From gcc-bugs-return-495455-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sun Aug 23 16:29:13 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 49342 invoked by alias); 23 Aug 2015 16:29:13 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 49289 invoked by uid 48); 23 Aug 2015 16:29:10 -0000 From: "wschmidt at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/37021] Fortran Complex reduction / multiplication not vectorized Date: Sun, 23 Aug 2015 16:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.4.0 X-Bugzilla-Keywords: alias, missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: wschmidt at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-08/txt/msg01597.txt.bz2 Content-length: 2691 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37021 Bill Schmidt changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wschmidt at gcc dot gnu.org --- Comment #20 from Bill Schmidt --- We still don't vectorize the original code example on Power. It appears that this is being disabled because of an alignment issue. The data references are being rejected by: product.f:9:0: note: can't force alignment of ref: REALPART_EXPR <*a.0_24[_50]> and similar for the other three DRs. This happens due to this code in vect_compute_data_ref_alignment: if (base_alignment < TYPE_ALIGN (vectype)) { /* Strip an inner MEM_REF to a bare decl if possible. */ if (TREE_CODE (base) == MEM_REF && integer_zerop (TREE_OPERAND (base, 1)) && TREE_CODE (TREE_OPERAND (base, 0)) == ADDR_EXPR) base = TREE_OPERAND (TREE_OPERAND (base, 0), 0); if (!vect_can_force_dr_alignment_p (base, TYPE_ALIGN (vectype))) { if (dump_enabled_p ()) { dump_printf_loc (MSG_NOTE, vect_location, "can't force alignment of ref: "); dump_generic_expr (MSG_NOTE, TDF_SLIM, ref); dump_printf (MSG_NOTE, "\n"); } return true; } Here TYPE_ALIGN (vectype) is 128 (Power vectors are normally aligned on a 128-bit value), and base_alignment is 64. a.0 is defined as: complex(kind=8) [0:D.1831] * restrict a.0; In both ELFv1 and ELFv2 ABIs for Power, a complex type is defined to have the same alignment as the underlying type. So "complex double" has 8-byte alignment. On earlier versions of Power, the decision is fine, because unaligned accesses are expensive prior to POWER8. With POWER8, though, an unaligned access will (most of the time) perform as well as an aligned access. So ideally we would like to teach the vectorizer to allow vectorization here. It seems like vect_supportable_dr_alignment ought to be considered as part of the SLP vectorization decision here, rather than just comparing the base alignment with the vector type alignment. Adding a check for that allows things to get a little further, but we still don't vectorize the block. (I haven't yet looked into why, but I assume more needs to be done downstream to handle this case.) My understanding of the vectorizer is not yet very deep, so before going too far down the wrong path, I'd like your opinion on the best approach to fixing the problem. Thanks! Bill