This fortran program fails for both x86_64 and powerpc when an appropriate veclibabi is specified that includes support for optimizing a pow invocation to V2DF variables.
On the x86_64 you need to use: -O3 -march=core2 -mavx -ffast-math -mveclibabi=svml On the powerpc you need to use: -O3 -mcpu=power7 -ffast-math -mveclibabi=mass Here is the debugger trace: Current directory is /home/meissner/fsf-build-x86_64/trunk/gcc/ GNU gdb (GDB) Fedora (7.1-34.fc13) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /data/meissner/fsf-build-x86_64/trunk/gcc/f951...done. Breakpoint 1 at 0x61b210: file /home/meissner/fsf-src/trunk/gcc/diagnostic.c, line 878. Breakpoint 2 at 0x61bfd0: file /home/meissner/fsf-src/trunk/gcc/diagnostic.c, line 819. Breakpoint 3 at 0x492d50 Breakpoint 4 at 0x492500 (gdb) r -O3 -quiet -march=core2 -mavx -ffast-math -mveclibabi=svml foo3.f Starting program: /data/meissner/fsf-build-x86_64/trunk/gcc/f951 -O3 -quiet -march=core2 -mavx -ffast-math -mveclibabi=svml foo3.f Program received signal SIGSEGV, Segmentation fault. 0x0000000000975884 in nested_in_vect_loop_p (stmt=0x7ffff05d6f68, gsi=0x7fffffffc5b0, strided_store=<value optimized out>, slp_node=<value optimized out>, slp_node_instance=<value optimized out>) at /home/meissner/fsf-src/trunk/gcc/tree-vectorizer.h:316 Missing separate debuginfos, use: debuginfo-install glibc-2.12-3.x86_64 libgcc-4.4.4-10.fc13.x86_64 libstdc++-4.4.4-10.fc13.x86_64 (gdb) where #0 0x0000000000975884 in nested_in_vect_loop_p (stmt=0x7ffff05d6f68, gsi=0x7fffffffc5b0, strided_store=<value optimized out>, slp_node=<value optimized out>, slp_node_instance=<value optimized out>) at /home/meissner/fsf-src/trunk/gcc/tree-vectorizer.h:316 #1 vect_transform_stmt (stmt=0x7ffff05d6f68, gsi=0x7fffffffc5b0, strided_store=<value optimized out>, slp_node=<value optimized out>, slp_node_instance=<value optimized out>) at /home/meissner/fsf-src/trunk/gcc/tree-vect-stmts.c:4607 #2 0x0000000000982a44 in vect_transform_loop (loop_vinfo=0x185e7f0) at /home/meissner/fsf-src/trunk/gcc/tree-vect-loop.c:4798 #3 0x000000000098e5a3 in vectorize_loops () at /home/meissner/fsf-src/trunk/gcc/tree-vectorizer.c:225 #4 0x00000000007969ef in execute_one_pass (pass=0x12270c0) at /home/meissner/fsf-src/trunk/gcc/passes.c:1573 #5 0x0000000000796c95 in execute_pass_list (pass=0x12270c0) at /home/meissner/fsf-src/trunk/gcc/passes.c:1628 #6 0x0000000000796ca7 in execute_pass_list (pass=0x12272a0) at /home/meissner/fsf-src/trunk/gcc/passes.c:1629 #7 0x0000000000796ca7 in execute_pass_list (pass=0x1226460) at /home/meissner/fsf-src/trunk/gcc/passes.c:1629 #8 0x000000000088f716 in tree_rest_of_compilation (fndecl=0x7ffff0865900) at /home/meissner/fsf-src/trunk/gcc/tree-optimize.c:452 #9 0x0000000000a2d4d6 in cgraph_expand_function (node=0x7ffff065f408) at /home/meissner/fsf-src/trunk/gcc/cgraphunit.c:1469 #10 0x0000000000a2feda in cgraph_expand_all_functions () at /home/meissner/fsf-src/trunk/gcc/cgraphunit.c:1548 #11 cgraph_optimize () at /home/meissner/fsf-src/trunk/gcc/cgraphunit.c:1804 #12 0x0000000000a3043a in cgraph_finalize_compilation_unit () at /home/meissner/fsf-src/trunk/gcc/cgraphunit.c:1012 #13 0x000000000075691d in write_global_declarations () at /home/meissner/fsf-src/trunk/gcc/langhooks.c:310 #14 0x0000000000836f0c in compile_file (argc=8, argv=0x7fffffffc938) at /home/meissner/fsf-src/trunk/gcc/toplev.c:967 #15 do_compile (argc=8, argv=0x7fffffffc938) at /home/meissner/fsf-src/trunk/gcc/toplev.c:2394 #16 toplev_main (argc=8, argv=0x7fffffffc938) at /home/meissner/fsf-src/trunk/gcc/toplev.c:2435 #17 0x0000003db681ec5d in __libc_start_main () from /lib64/libc.so.6 #18 0x00000000004a4309 in _start () (gdb) quit A debugging session is active. Inferior 1 [process 21141] will be killed. Quit anyway? (y or n) y Debugger finished If I compile it without the -mveclibabi= switch it works fine (or on the x86 use -mveclibabi=svml since svml does not provide a pow that supports V2DF arguments). -- Summary: Vectorization of double pow function causes a segmentation fault Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: meissner at gcc dot gnu dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45714