1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s -o /dev/null 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc /* GCC was not emitting string constants of the correct length when 4*f4a2713aSLionel Sambuc * embedded into a structure field like this. It thought the strlength 5*f4a2713aSLionel Sambuc * was -1. 6*f4a2713aSLionel Sambuc */ 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc typedef struct Connection_Type { 9*f4a2713aSLionel Sambuc long to; 10*f4a2713aSLionel Sambuc char type[10]; 11*f4a2713aSLionel Sambuc long length; 12*f4a2713aSLionel Sambuc } Connection; 13*f4a2713aSLionel Sambuc 14*f4a2713aSLionel Sambuc Connection link[3] 15*f4a2713aSLionel Sambuc = { {1, "link1", 10}, 16*f4a2713aSLionel Sambuc {2, "link2", 20}, 17*f4a2713aSLionel Sambuc {3, "link3", 30} }; 18*f4a2713aSLionel Sambuc 19