EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS 7.0.1-pre1 (typeCast.h)
From: Dirk Zimoch <[email protected]>
To: Michael Davidsaver <[email protected]>, <[email protected]>
Date: Thu, 23 Nov 2017 09:50:17 +0100
I have changed "FORCE_INLINE" to "inline" in typeCast.h line 168 function castUnsafe and tried to build again.

Now typeCast.cpp compiles.

The build fails now in dbsingle.cpp like the other vxWorks builds.


On 23.11.2017 08:50, Dirk Zimoch wrote:
On 22.11.2017 16:51, Michael Davidsaver wrote:
On 11/22/2017 06:28 AM, Dirk Zimoch wrote:
The vxWorks 6.6 and 6.7 builds failed here:
../../src/misc/pv/typeCast.h: In function
'void<unnamed>::castVTyped(size_t, void*, const void*) [with TO = long
long unsigned int, FROM = double]':
../../src/misc/pv/typeCast.h:168: sorry, unimplemented: inlining failed
in call to 'TO epics::pvData::castUnsafe(const FROM&) [with TO = long
long unsigned int, FROM = double]': function not considered for inlining
../../src/misc/typeCast.cpp:37: sorry, unimplemented: called from here

Which GCC version is involved here?  It seems like the logic controlling
FORCE_INLINE in templateMeta.h needs to be adjusted.


https://github.com/epics-base/pvDataCPP/blob/master/src/misc/pv/templateMeta.h#L13



This is the gcc that comes with vxWorks:

vxWorks 6.6:
gcc version 4.1.2 (Wind River VxWorks G++ 4.1-82)

vxWorks 6.7:
gcc version 4.1.2 (Wind River VxWorks G++ DWARF-EH 4.1-131)

It gets "__attribute__((always_inline)) inline" and understands it. It
just does not like inlining that particular function, but does not say why.

Here is the pre-processed code:
# 167 "../../src/misc/pv/typeCast.h"
template<typename TO, typename FROM>
static __attribute__((always_inline)) inline TO castUnsafe(const FROM&
from)
{
    return detail::cast_helper<TO,FROM>::op(from);
}

__attribute__ ((visibility("default"))) extern void castUnsafeV(size_t
count, ScalarType to, void *dest, ScalarType from, const void *src);


It is called from here:
namespace {

static void noconvert(size_t, void*, const void*)
{
    throw std::runtime_error("castUnsafeV: Conversion not supported");
}

template<typename TO, typename FROM>
static void castVTyped(size_t count, void *draw, const void *sraw)
{
    TO *dest=(TO*)draw;
    const FROM *src=(FROM*)sraw;



    const FROM *last = src+count;
    try {
        while (src != last) {
          *dest = castUnsafe<TO,FROM>(*src);
          ++dest; ++src;
        }
    } catch (std::exception& ex) {
...


Replies:
Re: EPICS 7.0.1-pre1 (typeCast.h) Dirk Zimoch
References:
EPICS 7.0.1-pre1 Andrew Johnson
Re: EPICS 7.0.1-pre1 Dirk Zimoch
Re: EPICS 7.0.1-pre1 (typeCast.h) Michael Davidsaver
Re: EPICS 7.0.1-pre1 (typeCast.h) Dirk Zimoch

Navigate by Date:
Prev: Re: EPICS 7.0.1-pre1 (typeCast.h) Dirk Zimoch
Next: Re: EPICS 7.0.1-pre1 (typeCast.h) Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: EPICS 7.0.1-pre1 (typeCast.h) Dirk Zimoch
Next: Re: EPICS 7.0.1-pre1 (typeCast.h) Dirk Zimoch
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
ANJ, 21 Dec 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·