From bac85a85987cc17958a445187ade7e76f2a83eff Mon Sep 17 00:00:00 2001 From: Michael Beck Date: Tue, 11 Dec 2007 19:00:33 +0000 Subject: [PATCH] should produce error: address of register variable a requested [r18672] --- parsetest/shouldfail/adr_reg.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 parsetest/shouldfail/adr_reg.c diff --git a/parsetest/shouldfail/adr_reg.c b/parsetest/shouldfail/adr_reg.c new file mode 100644 index 0000000..630d9b6 --- /dev/null +++ b/parsetest/shouldfail/adr_reg.c @@ -0,0 +1,9 @@ +int test(int *a) { + return *a; +} + +int main() { + register int a = 3; + + printf("%d\n", test(&a)); +} -- 2.20.1