[PATCH 18/18] asm: arrays & functions in non-memory operand degenerate into pointers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Non-memory asm operands are very much like the argument of a function
and as such any array (or function designator) given need to degenerate
into the corresponding pointer.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 evaluate.c                  | 3 +++
 validation/eval/asm-degen.c | 1 -
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/evaluate.c b/evaluate.c
index 4f7efc480..157260691 100644
--- a/evaluate.c
+++ b/evaluate.c
@@ -3592,6 +3592,9 @@ static void evaluate_asm_memop(struct asm_operand *op)
 
 		evaluate_addressof(addr);
 		op->expr = addr;
+	} else {
+		evaluate_expression(op->expr);
+		degenerate(op->expr);
 	}
 }
 
diff --git a/validation/eval/asm-degen.c b/validation/eval/asm-degen.c
index 5f3191597..7bbed9255 100644
--- a/validation/eval/asm-degen.c
+++ b/validation/eval/asm-degen.c
@@ -29,7 +29,6 @@ static void qux(void)
 
 /*
  * check-name: asm-degen
- * check-known-to-fail
  *
  * check-error-start
 eval/asm-degen.c:12:24: warning: dereference of noderef expression
-- 
2.23.0




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux