File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ #include <stdio.h>
2+ #include <tgmath.h>
3+ #include <complex.h>
4+ #include "testharness.h"
5+
6+ typedef struct loc_t
7+ {
8+ long nloc ;
9+ } loc_t ;
10+
11+
12+ void fun (const loc_t * loc ) {
13+ long l ;
14+ int n0 = (int )sqrt (l ); // works
15+ int n1 = (int )sqrt (loc -> nloc ); // fails
16+ }
17+
18+
19+ int main () {
20+ loc_t loc ;
21+ loc .nloc = 5 ;
22+ loc_t * ptr = & loc ;
23+ fun (ptr );
24+ }
Original file line number Diff line number Diff line change @@ -695,6 +695,7 @@ sub addToGroup {
695695addTest(" testrunc99/c99-universal-character-names" );
696696
697697addTest(" testrunc99/c99-tgmath" );
698+ addTest(" testrunc99/c99-tgmath2" );
698699addTest(" testrunc99/c99-float-pragma" );
699700addTest(" testrunc99/c99-fixed-width-int" );
700701addTest(" combinec99inline" );
You can’t perform that action at this time.
0 commit comments