1f08c3bdfSopenharmony_ciextern int a, *ptr; 2f08c3bdfSopenharmony_ci 3f08c3bdfSopenharmony_ciint a = 0; 4f08c3bdfSopenharmony_ciint a = 1; 5f08c3bdfSopenharmony_ci 6f08c3bdfSopenharmony_ciint *ptr = &a; 7f08c3bdfSopenharmony_ciint *ptr = &a; 8f08c3bdfSopenharmony_ci 9f08c3bdfSopenharmony_cistatic void foo(void) 10f08c3bdfSopenharmony_ci{ 11f08c3bdfSopenharmony_ci int a = 0; 12f08c3bdfSopenharmony_ci int a = 1; 13f08c3bdfSopenharmony_ci 14f08c3bdfSopenharmony_ci int *ptr = &a; 15f08c3bdfSopenharmony_ci int *ptr = &a; 16f08c3bdfSopenharmony_ci} 17f08c3bdfSopenharmony_ci 18f08c3bdfSopenharmony_ci/* 19f08c3bdfSopenharmony_ci * check-name: duplicated-defs 20f08c3bdfSopenharmony_ci * check-known-to-fail 21f08c3bdfSopenharmony_ci * 22f08c3bdfSopenharmony_ci * check-error-start 23f08c3bdfSopenharmony_cidup-defs-local.c:4:5: error: symbol 'a' has multiple initializers (originally initialized at duplicated-defs.c:3) 24f08c3bdfSopenharmony_cidup-defs-local.c:7:5: error: symbol 'ptr' has multiple initializers (originally initialized at duplicated-defs.c:6) 25f08c3bdfSopenharmony_cidup-defs-local.c:12:13: error: symbol 'a' has multiple initializers (originally initialized at duplicated-defs.c:11) 26f08c3bdfSopenharmony_cidup-defs-local.c:15:13: error: symbol 'ptr' has multiple initializers (originally initialized at duplicated-defs.c:14) 27f08c3bdfSopenharmony_ci * check-error-end 28f08c3bdfSopenharmony_ci */ 29