diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-11-16 21:24:27 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2017-11-17 10:04:37 +0100 |
| commit | 5bd565dd77ec91c992e01638cc8f32d6bc51b44a (patch) | |
| tree | 9879684be782dce0376ee8762f65ee2bd8bcda58 /validation/backend/call-variadic.c | |
| parent | f48b9566eba161bdce4bf4c4af2839ce6843b90e (diff) | |
| download | sparse-dev-5bd565dd77ec91c992e01638cc8f32d6bc51b44a.tar.gz | |
llvm: fix variadic calls with constants
The linearized code, sparse's IR, have no use of C's complex type
system. Those types are checked in previous phases and the pseudos
doesn't have a type directly attached to them as all the needed
typing info info are conveyed by the instructions.
In particular, PSEUDO_VAL (used for integer and address constants)
are completely typeless.
There is a problem with this when calling a variadic function
with a constant argument as in this case there is no type in the
function prototype (for the variadic part, of course) and there is
no defining instructions holding the type of the argument.
Fiw this by using the type of the arguments explicitly given
in the OP_CALL instructions.
Reported-by: Dibyendu Majumdar <mobile@majumdar.org.uk>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/backend/call-variadic.c')
| -rw-r--r-- | validation/backend/call-variadic.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/backend/call-variadic.c b/validation/backend/call-variadic.c index 19afacee..b6e40644 100644 --- a/validation/backend/call-variadic.c +++ b/validation/backend/call-variadic.c @@ -11,7 +11,6 @@ int foo(const char *fmt, int a, long l, int *p) /* * check-name: call-variadic * check-command: sparse-llvm-dis -m64 $file - * check-known-to-fail * * check-output-start ; ModuleID = '<stdin>' |
