File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,18 @@ int negintval(const char c) { return -c; }
1616
1717int varargs_intval (const char c , ...) { return c ; }
1818
19+ // See #1281. Varargs don't yet work on aarch64.
20+ #ifndef __aarch64__
21+
1922int varargs_fp (const int c , ...) {
2023 va_list arg ;
2124 va_start (arg , c );
2225 char_to_int * fp = va_arg (arg , char_to_int * );
2326 return fp ((char )c );
2427}
2528
29+ #endif
30+
2631void entry3 (const unsigned sz , int buffer [const ]) {
2732 int i = 0 ;
2833
@@ -68,9 +73,11 @@ void entry3(const unsigned sz, int buffer[const]) {
6873 j = p4 != 0 ;
6974 j = 0 != p4 ;
7075
76+ #ifndef __aarch64__
7177 va_char_to_int_fp p8 = varargs_intval ;
7278 buffer [i ++ ] = p8 ('A' );
7379 buffer [i ++ ] = (* p8 )('B' , 'C' );
80+ #endif
7481
7582 // Test valid casts between function pointers
7683 // with additional parameters
@@ -90,6 +97,8 @@ void entry3(const unsigned sz, int buffer[const]) {
9097 buffer [i ++ ] = (* (s ).fn )(('a' ));
9198
9299 buffer [i ++ ] = p2 == intval ;
100+ #ifndef __aarch64__
93101 buffer [i ++ ] = varargs_fp ('a' , intval );
94102 buffer [i ++ ] = varargs_fp ('b' , p2 );
103+ #endif
95104}
You can’t perform that action at this time.
0 commit comments