From 77224e310acc584a7901be84ecbbf08eee504cd6 Mon Sep 17 00:00:00 2001 From: MaartenBrock Date: Tue, 5 Sep 2006 10:17:23 +0000 Subject: [PATCH] * support/regression/tests/bug1551947.c: new, added * src/SDCCsymt.h: strings are char* not byte* git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4362 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- ChangeLog | 2 ++ src/SDCCsymt.h | 4 ++-- support/regression/tests/bug1551947.c | 15 +++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 support/regression/tests/bug1551947.c diff --git a/ChangeLog b/ChangeLog index 1bc23eec..685c708b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,8 @@ * src/SDCCopt.c (cnvToFcall): fixed bug 1551947 by updating OP_USES and OP_DEFS + * support/regression/tests/bug1551947.c: new, added + * src/SDCCsymt.h: strings are char* not byte* 2006-09-05 Raphael Neider diff --git a/src/SDCCsymt.h b/src/SDCCsymt.h index aae73278..c30beab8 100644 --- a/src/SDCCsymt.h +++ b/src/SDCCsymt.h @@ -169,7 +169,7 @@ typedef struct specifier union { /* Values if constant or enum */ TYPE_TARGET_INT v_int; /* 2 bytes: int and char values */ - TYPE_TARGET_CHAR *v_char; /* character string */ + char *v_char; /* character string */ TYPE_TARGET_UINT v_uint; /* 2 bytes: unsigned int const value */ TYPE_TARGET_LONG v_long; /* 4 bytes: long constant value */ TYPE_TARGET_ULONG v_ulong; /* 4 bytes: unsigned long constant value */ @@ -280,7 +280,7 @@ typedef struct symbol unsigned isinvariant:1; /* is a loop invariant */ unsigned cdef:1; /* compiler defined symbol */ unsigned addrtaken:1; /* address of the symbol was taken */ - unsigned isreqv:1; /* is the register quivalent of a symbol */ + unsigned isreqv:1; /* is the register equivalent of a symbol */ unsigned udChked:1; /* use def checking has been already done */ /* following flags are used by the backend diff --git a/support/regression/tests/bug1551947.c b/support/regression/tests/bug1551947.c new file mode 100644 index 00000000..f3980cd4 --- /dev/null +++ b/support/regression/tests/bug1551947.c @@ -0,0 +1,15 @@ +/* + bug1551947.c +*/ + +#include + +xdata float z; +xdata float x = 1.0; + +void +testBug(void) +{ + z = x * x; + ASSERT( z == 1.0 ); +} -- 2.39.2