Current trunk: (sid)30104:tbm@em64t: ~] /usr/lib/gcc-snapshot/bin/gcc -c -O2 -ftree-vectorize zapping-properties-handler.c zapping-properties-handler.c: In function 'picture_sizes_load_default': zapping-properties-handler.c:19: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate.
Created attachment 14387 [details] preprocessed source
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */ typedef struct z_key { int key; int mask; } z_key; typedef struct picture_size { z_key key; } picture_size; void picture_size_new (picture_size *ps) { z_key key; ps->key = key; } void picture_sizes_load_default (picture_size *ps) { int i; for (i = 0; i < 5; ++i) picture_size_new (ps); }
Performing interprocedural optimizations <visibility> <early_local_cleanups> <inline> <static-var> <pure-const>Assembling functions: picture_size_new picture_sizes_load_default Program received signal SIGSEGV, Segmentation fault. create_data_ref (nest=0x2b26f0017be0, memref=0x2b26ef7719c0, stmt=<value optimized out>, is_read=1 '\001') at gcc/tree-data-ref.c:746 746 if (DECL_P (base)) (gdb) where #0 create_data_ref (nest=0x2b26f0017be0, memref=0x2b26ef7719c0, stmt=<value optimized out>, is_read=1 '\001') at gcc/tree-data-ref.c:746 #1 0x00000000006eb773 in compute_data_dependences_for_loop (loop=0x2b26f0017be0, compute_self_and_read_read_dependences=1 '\001', datarefs=0xff4888, dependence_relations=0xff4890) at gcc/tree-data-ref.c:4015 #2 0x0000000000a9af4f in vect_analyze_loop (loop=0x2b26f0017be0) at gcc/tree-vect-analyze.c:3170 #3 0x000000000080bcd0 in vectorize_loops () at gcc/tree-vectorizer.c:2501 #4 0x000000000063f247 in execute_one_pass (pass=0xee2d00) at gcc/passes.c:1117 #5 0x000000000063f40c in execute_pass_list (pass=0xee2d00) at gcc/passes.c:1170 #6 0x000000000063f41e in execute_pass_list (pass=0xee2b20) at gcc/passes.c:1171 #7 0x000000000063f41e in execute_pass_list (pass=0xee1f20) at gcc/passes.c:1171 #8 0x0000000000717e0e in tree_rest_of_compilation (fndecl=0x2b26f012aa00) at gcc/tree-optimize.c:404 #9 0x000000000089adb2 in cgraph_expand_function (node=0x2b26f012ab00) at gcc/cgraphunit.c:1060 #10 0x000000000089c858 in cgraph_optimize () at gcc/cgraphunit.c:1123 #11 0x0000000000414d9e in c_write_global_declarations () at gcc/c-decl.c:8077 #12 0x00000000006bb0b7 in toplev_main (argc=<value optimized out>, argv=<value optimized out>) at gcc/toplev.c:1055 #13 0x00002b26efcd3b44 in __libc_start_main () from /lib/libc.so.6 #14 0x00000000004043f9 in _start () (gdb)
This didn't happen with trunk from 20070916.
For the data ref in the testcase, VIEW_CONVERT_EXPR<struct z_key>(0), get_base_address() (in dr_analyze_alias) returns NULL, which causes the segfault. Ira
Testing a patch.
Subject: Bug 33856 Author: jakub Date: Mon Nov 5 08:44:23 2007 New Revision: 129897 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129897 Log: PR tree-optimization/33856 * tree-data-ref.c (get_references_in_stmt): Don't add REFERENCE_CLASS_P trees to references vector if get_base_address returns NULL on them. * gcc.c-torture/compile/20071027-1.c: New test. Added: trunk/gcc/testsuite/gcc.c-torture/compile/20071027-1.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-data-ref.c
Fixed.
*** Bug 34047 has been marked as a duplicate of this bug. ***