I'm getting the following segfault on IA-64 with current 4.2 and 4.3. This goes back at least to 20060721 - I don't have anything older to test here at the moment. I don't see this segfault on x86_64. Unfortunately I don't have a working gdb on ia-64 at the moment so I cannot supply a backtrace. tbm@coconut0:~$ /usr/lib/gcc-snapshot/bin/gcc -c -O1 -ftree-vectorize /home/tbm/poc-streamer-ogg-write.c /home/tbm/poc-streamer-ogg-write.c: In function 'ogg_fill_page_hdr': /home/tbm/poc-streamer-ogg-write.c:14: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. Testcase: typedef struct buf_s { unsigned long size; } buf_t; typedef struct ogg_page_s { unsigned char page_segments; unsigned char lacing_values[255]; buf_t raw; } ogg_page_t; ogg_fill_page_hdr (ogg_page_t *page) { unsigned long size = page->page_segments; int i; for (i = 0; i < page->page_segments; i++) size += page->lacing_values[i]; if (page->raw.size < size) for (i = 0; i < page->page_segments; i++) continue; }
(In reply to comment #0) > I'm getting the following segfault on IA-64 with current 4.2 and 4.3. > This goes back at least to 20060721 - I don't have anything older to > test here at the moment. I don't see this segfault on x86_64. > Unfortunately I don't have a working gdb on ia-64 at the moment so > I cannot supply a backtrace. Can someone with access to ia64 provide more detail? gdb backtrace? vectorizer dump file (with -fdump-tree-vect-details)? (can't reproduce it on powerpc and i386)
(In reply to comment #1) > Can someone with access to ia64 provide more detail? gdb backtrace? vectorizer > dump file (with -fdump-tree-vect-details)? (can't reproduce it on powerpc and > i386) I'm afraid I still don't have a working gdb, but I'll attach the dump file. Steve, can you post a backtrace?
Created attachment 13812 [details] dump file of -fdump-tree-vect-details
I just tried to reproduce this bug on IA64 Linux (and HP-UX) with ToT sources (version 126242) and was not able to. Can anyone else reproduce this with ToT sources?
(In reply to comment #4) > I just tried to reproduce this bug on IA64 Linux (and HP-UX) with ToT sources > (version 126242) and was not able to. Can anyone else reproduce this with ToT > sources? does the fact that no one has responded yet means that this failure cannot be reproduced anymore?
(In reply to comment #5) > does the fact that no one has responded yet means that this failure cannot be > reproduced anymore? I'll try next week and let you know.
Well, that was silly. I couldn't reproduce the problem because I had a patch in my local tree. Here is the patch I created, I will submit it to gcc-patches. Basically, get_vectype_for_scalar_type can return a NULL_TREE and we need to allow for that and not call TYPE_MODE with a NULL_TREE. Index: tree-vect-patterns.c =================================================================== --- tree-vect-patterns.c (revision 126897) +++ tree-vect-patterns.c (working copy) @@ -651,8 +651,9 @@ vect_pattern_recog_1 ( || (icode = optab->handlers[(int) vec_mode].insn_code) == CODE_FOR_nothing || (type_out - && (insn_data[icode].operand[0].mode != - TYPE_MODE (get_vectype_for_scalar_type (type_out))))) + && (!get_vectype_for_scalar_type (type_out) + || (insn_data[icode].operand[0].mode != + TYPE_MODE (get_vectype_for_scalar_type (type_out)))))) return; }
Subject: Bug 32218 Author: sje Date: Wed Jul 25 20:24:15 2007 New Revision: 126931 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126931 Log: PR target/32218 * tree-vect-patterns.c (vect_pattern_recog_1): Check for valid type. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-vect-patterns.c
The fix for this was approved and checked into mainline.
(In reply to comment #9) > The fix for this was approved and checked into mainline. resolved/fixed? what about 4.2 branch? it's a regression.
Sorry, I missed the fact that it was a regression. I will test the 4.2 branch and then backport it.
Subject: Bug 32218 Author: sje Date: Mon Jul 30 15:15:54 2007 New Revision: 127062 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127062 Log: PR target/32218 * tree-vect-patterns.c (vect_pattern_recog_1): Check for valid type. Modified: branches/gcc-4_2-branch/gcc/ChangeLog branches/gcc-4_2-branch/gcc/tree-vect-patterns.c