xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/2009-05-22-callingconv.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -emit-llvm -o - -triple i386-unknown-unknown | grep call | grep x86_stdcallcc
2*f4a2713aSLionel Sambuc void abort(void) __attribute__((__noreturn__));
3*f4a2713aSLionel Sambuc typedef void re_string_t;
4*f4a2713aSLionel Sambuc typedef void re_dfa_t;
5*f4a2713aSLionel Sambuc typedef int reg_errcode_t;
6*f4a2713aSLionel Sambuc static reg_errcode_t re_string_construct (re_string_t *pstr, const char *str,
7*f4a2713aSLionel Sambuc        int len, char * trans,
8*f4a2713aSLionel Sambuc        int icase, const re_dfa_t *dfa)
9*f4a2713aSLionel Sambuc      __attribute__ ((regparm (3), stdcall));
10*f4a2713aSLionel Sambuc static reg_errcode_t
re_string_construct(pstr,str,len,trans,icase,dfa)11*f4a2713aSLionel Sambuc re_string_construct (pstr, str, len, trans, icase, dfa)
12*f4a2713aSLionel Sambuc      re_string_t *pstr;
13*f4a2713aSLionel Sambuc      const char *str;
14*f4a2713aSLionel Sambuc      int len, icase;
15*f4a2713aSLionel Sambuc      char * trans;
16*f4a2713aSLionel Sambuc      const re_dfa_t *dfa;
17*f4a2713aSLionel Sambuc {
18*f4a2713aSLionel Sambuc         if (dfa != (void*)0x282020c0)
19*f4a2713aSLionel Sambuc                 abort();
20*f4a2713aSLionel Sambuc return 0;
21*f4a2713aSLionel Sambuc }
main()22*f4a2713aSLionel Sambuc int main()
23*f4a2713aSLionel Sambuc {
24*f4a2713aSLionel Sambuc   return re_string_construct(0, 0, 0, 0, 0, (void*)0x282020c0);
25*f4a2713aSLionel Sambuc }
26