From 9ecdc0d5e2b4875b289b8bb28ba1eb76323abf69 Mon Sep 17 00:00:00 2001 From: Virgile Prevosto <virgile.prevosto@m4x.org> Date: Fri, 5 Jul 2024 16:15:55 +0200 Subject: [PATCH] [tests] prepare test case for expression mistakenly considered as const --- tests/syntax/ko_global.c | 4 ++++ tests/syntax/oracle/ko_global.res.oracle | 15 ++++++++------- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/syntax/ko_global.c b/tests/syntax/ko_global.c index 2c61e443df6..7eb38c401b6 100644 --- a/tests/syntax/ko_global.c +++ b/tests/syntax/ko_global.c @@ -3,9 +3,13 @@ STDOPT: */ +#include <stdint.h> + int * const a; int * b = a; +uintptr_t b1 = (uintptr_t) a; + struct stru { const int c; }; diff --git a/tests/syntax/oracle/ko_global.res.oracle b/tests/syntax/oracle/ko_global.res.oracle index 204f067a98c..9b0dddba526 100644 --- a/tests/syntax/oracle/ko_global.res.oracle +++ b/tests/syntax/oracle/ko_global.res.oracle @@ -1,11 +1,12 @@ [kernel] Parsing ko_global.c (with preprocessing) -[kernel] ko_global.c:7: User Error: a is not a compile-time constant -[kernel] ko_global.c:17: User Error: f is not a compile-time constant -[kernel] ko_global.c:19: User Error: g is not a compile-time constant -[kernel] ko_global.c:24: User Error: i is not a compile-time constant -[kernel] ko_global.c:27: User Error: k is not a compile-time constant -[kernel] ko_global.c:34: User Error: n is not a compile-time constant -[kernel] ko_global.c:41: User Error: q is not a compile-time constant +[kernel] ko_global.c:9: User Error: a is not a compile-time constant +[kernel] ko_global.c:11: User Error: a is not a compile-time constant +[kernel] ko_global.c:21: User Error: f is not a compile-time constant +[kernel] ko_global.c:23: User Error: g is not a compile-time constant +[kernel] ko_global.c:28: User Error: i is not a compile-time constant +[kernel] ko_global.c:31: User Error: k is not a compile-time constant +[kernel] ko_global.c:38: User Error: n is not a compile-time constant +[kernel] ko_global.c:45: User Error: q is not a compile-time constant [kernel] User Error: stopping on file "ko_global.c" that has errors. Add '-kernel-msg-key pp' for preprocessing command. [kernel] Frama-C aborted: invalid user input. -- GitLab