1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 <2004> 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 <2004> 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: calc and calcout records in EPICS 3.14.6 |
From: | Dirk Zimoch <[email protected]> |
To: | Geoff Savage <[email protected]> |
Cc: | EPICS Tech-Talk <[email protected]> |
Date: | Tue, 16 Nov 2004 09:30:33 +0100 |
Hello Dave,
I have dowloaded your Tornado 2.2 cross compiler for Linux and built EPICS3.13 with it.
Unfortunately, I found a serious bug: The calc record didn't work any more!
The simple CALC "A=B" behaves like "A<=B" what I found very strange. I found that I only had the problem when using the -O compiler flag. Without optimization, everything is fine.
I guess that the bug also leads to a lot of other errors.
I tracked the problem down to:
double a,b,c; a=1; b=2; c=(a==b);
results in 1.0000 !
But
double a,b,c; int i; a=1; b=2; i=(a==b); c=i;
result to 0.0000 as expected.
The problem is independent of EPICS. I just compiled the attached C-file with 'ccppc -c -O comptest.c' and loaded the object code on a MVME5100 IOC with only vxWorks running.
The generated assembler code looks different from the code generated on Solaris.
Have you ever seen this? What's going wrong? Can you fix it?
Best regards Dirk
Hi,
We noticed some changed behaviour in calc and calcout records from v3.13.4 to v3.14.6 and were unable to identify the cause. Take a simple calc record, maybe too simple:
record(calc,"CTL_TEST_66/CALC") {
field(CALC, "1=0")
field(SCAN, "1 second")
}
In v3.13.4 VAL is the expected value of zero. In v3.14.6 VAL is one. The same applies for the calcout record.
What are we missing?
Geoff
-- Dr. Dirk Zimoch Swiss Light Source Paul Scherrer Institut Computing and Controls phone +41 56 310 5182 fax +41 56 310 4413