comparison gcc/testsuite/gcc.dg/pr43157.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do link } */
2 /* { dg-require-effective-target lto } */
3 /* { dg-require-linker-plugin "" } */
4 /* { dg-options "-O1 -flto -fuse-linker-plugin" } */
5
6 #define LABEL3(pfx, x) # pfx x
7 #define LABEL2(pfx, x) LABEL3(pfx, x)
8 #define LABEL(x) LABEL2(__USER_LABEL_PREFIX__, x)
9
10 unsigned int factorial_ (unsigned int) __asm__ (LABEL ("factorial"));
11
12 unsigned int factorial (unsigned int i)
13 {
14 return i > 1 ? i * factorial_ (i - 1) : 1;
15 }
16
17 int main (void)
18 {
19 return factorial (5);
20 }