diff --git a/compiler/test/compilable/test21267.c b/compiler/test/compilable/test21267.c new file mode 100644 index 0000000000..6bc355f232 --- /dev/null +++ b/compiler/test/compilable/test21267.c @@ -0,0 +1,4 @@ +// https://github.com/dlang/dmd/issues/21267 +static inline __forceinline int square(int x) { return x * x; } + +int doSquare(int x) { return square(x); } diff --git a/druntime/src/importc.h b/druntime/src/importc.h index dcca9ea5d4..9d8ceff4f0 100644 --- a/druntime/src/importc.h +++ b/druntime/src/importc.h @@ -56,7 +56,7 @@ */ #define __fastcall -#define __forceinline +#define __forceinline __attribute__((always_inline)) #undef _Check_return_ //#define _Check_return_ #define __pragma(x)