URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Go to most recent revision |
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
149 |
jeremybenn |
/* { dg-do compile } */
|
2 |
|
|
/* { dg-options "-O2" } */
|
3 |
|
|
|
4 |
|
|
extern void *memset (void *, int, __SIZE_TYPE__);
|
5 |
|
|
extern __SIZE_TYPE__ strlen (const char *);
|
6 |
|
|
|
7 |
|
|
int
|
8 |
|
|
main (int argc, char **argv)
|
9 |
|
|
{
|
10 |
|
|
char x[8] = "abc";
|
11 |
|
|
memset (x, argc, strlen (x));
|
12 |
|
|
return 0;
|
13 |
|
|
}
|
14 |
|
|
/* { dg-final { scan-assembler-not "(?n)strlen\(.*\n\)+.*strlen" { target { ! { powerpc*-*-darwin* hppa*-*-hpux* ia64-*-hpux* } } } } } */
|
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* } } } */
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.