Eli Friedman | 3fbc473 | 2009-06-01 10:04:20 +0000 | [diff] [blame] | 1 | // RUN: clang-cc %s -o %t -emit-llvm -verify |
2 | // PR4289 | ||||
3 | |||||
4 | struct funcptr { | ||||
Mike Stump | c36541e | 2009-07-21 20:52:43 +0000 | [diff] [blame] | 5 | int (*func)(); |
Eli Friedman | 3fbc473 | 2009-06-01 10:04:20 +0000 | [diff] [blame] | 6 | }; |
7 | |||||
8 | static int func(f) | ||||
Mike Stump | c36541e | 2009-07-21 20:52:43 +0000 | [diff] [blame] | 9 | void *f; |
Eli Friedman | 3fbc473 | 2009-06-01 10:04:20 +0000 | [diff] [blame] | 10 | { |
Mike Stump | c36541e | 2009-07-21 20:52:43 +0000 | [diff] [blame] | 11 | return 0; |
Eli Friedman | 3fbc473 | 2009-06-01 10:04:20 +0000 | [diff] [blame] | 12 | } |
13 | |||||
14 | int | ||||
15 | main(int argc, char *argv[]) | ||||
16 | { | ||||
Mike Stump | c36541e | 2009-07-21 20:52:43 +0000 | [diff] [blame] | 17 | struct funcptr fp; |
Eli Friedman | 3fbc473 | 2009-06-01 10:04:20 +0000 | [diff] [blame] | 18 | |
Mike Stump | c36541e | 2009-07-21 20:52:43 +0000 | [diff] [blame] | 19 | fp.func = &func; |
20 | fp.func = func; | ||||
Eli Friedman | 3fbc473 | 2009-06-01 10:04:20 +0000 | [diff] [blame] | 21 | } |