Created attachment 25413 [details] reduced testcase Compiler output: $ gcc -O -foptimize-strlen -fno-tree-ccp testcase.c testcase.c: In function 'foo': testcase.c:10:1: internal compiler error: tree check: expected ssa_name, have addr_expr in find_equal_ptrs, at tree-ssa-strlen.c:712 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: r179488 - crash
Created attachment 25418 [details] gcc47-pr50613.patch Untested fix.
Author: jakub Date: Wed Oct 5 18:09:56 2011 New Revision: 179567 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179567 Log: PR tree-optimization/50613 * tree-ssa-strlen.c (find_equal_ptrs): If CASE_CONVERT operand is ADDR_EXPR, fallthru into ADDR_EXPR handling, and if it is neither that not SSA_NAME, give up. * gcc.dg/pr50613.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr50613.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-strlen.c
Fixed.