blob: bd5e1a98b24bd9cd2b9fa8a716698cfa58e43b00 [file] [log] [blame]
Chris Lattner1423ea42008-01-12 18:39:25 +00001// RUN: clang -fsyntax-only -verify %s
Chris Lattnerfa28b302008-01-12 08:14:25 +00002
Chris Lattner1423ea42008-01-12 18:39:25 +00003void abcdefghi12(void) {
Chris Lattnerfa28b302008-01-12 08:14:25 +00004 const char (*ss)[12] = &__func__;
Chris Lattner1423ea42008-01-12 18:39:25 +00005 static int arr[sizeof(__func__)==12 ? 1 : -1];
Chris Lattnerfa28b302008-01-12 08:14:25 +00006}
7
Chris Lattner1423ea42008-01-12 18:39:25 +00008char *X = __func__; // expected-error {{predefined identifier is only valid}}
9
10void a() {
11 __func__[0] = 'a'; // expected-error {{variable is not assignable}}
12}