Daily bump.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr27095.c
blob5ec39687a06d411c8905b88a832b05f3b42339d0
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 extern void *memset (void *, int, __SIZE_TYPE__);
5 extern __SIZE_TYPE__ strlen (const char *);
7 int
8 main (int argc, char **argv)
10 char x[8] = "abc";
11 memset (x, argc, strlen (x));
12 return 0;
14 /* { dg-final { scan-assembler-not "(?n)strlen\(.*\n\)+.*strlen" { target { ! { powerpc*-*-darwin* hppa*-*-hpux* ia64-*-hpux* alpha*-*-* } } } } } */
15 /* hppa*-*-hpux* has an IMPORT statement for strlen (plus the branch). */
16 /* *-*-darwin* has something similar. */
17 /* { dg-final { scan-assembler-not "(?n)strlen\(.*\n\)+.*strlen\(.*\n\)+.*strlen" { target hppa*-*-hpux* } } } */
18 /* { dg-final { scan-assembler-not "(?n)bl L_strlen\(.*\n\)+.*bl L_strlen" { target powerpc*-*-darwin* } } } */
19 /* ia64-*-hpux* has a global statement, a type statement, and the branch. */
20 /* { dg-final { scan-assembler-not "(?n)strlen\(.*\n\)+.*strlen\(.*\n\)+.*strlen\(.*\n\)+.*strlen" { target ia64-*-hpux* } } } */
21 /* alpha-*-* has a GOT load and the call. */
22 /* { dg-final { scan-assembler-not "(?n)jsr .*,strlen\(.*\n\)+.*jsr .*,strlen" { target alpha*-*-* } } } */