[Bug c++/65292] New: Template function not emitted

raj.khem at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Mar 3 05:48:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65292

            Bug ID: 65292
           Summary: Template function not emitted
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: raj.khem at gmail dot com

Created attachment 34932
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34932&action=edit
testcase

Attached code from webkit, shows that when compiling it for arm with gcc -O2, a
function goes missing in the object file

   case NonArrayWithInt32: case ArrayWithInt32: {
        putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>(exec, i,
value);
        break;
    }

    case NonArrayWithDouble: case ArrayWithDouble: {
        putByIndexBeyondVectorLengthWithoutAttributes<DoubleShape>(exec, i,
value);
        break;
    }

    case NonArrayWithContiguous: case ArrayWithContiguous: {
        putByIndexBeyondVectorLengthWithoutAttributes<ContiguousShape>(exec, i,
value);
        break;
    }

Out of those calls, putByIndexBeyondVectorLengthWithoutAttributes<Int32Shape>
is not emitted into .s file, when compiled with -O1 the function is emitted


This problem is not happening on 4.8.x or 4.9.x

gcc-5.0 - O2
==============

readelf -sW JSObject.o | c++filt | grep
putByIndexBeyondVectorLengthWithoutAttributes
   298: 00000000   284 FUNC    WEAK   HIDDEN    43 void
JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes<(unsigned
char)22>(JSC::ExecState*, unsigned int, JSC::JSValue)
   300: 00000000   264 FUNC    WEAK   HIDDEN    45 void
JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes<(unsigned
char)26>(JSC::ExecState*, unsigned int, JSC::JSValue)

gcc-5.0 - O1
============

readelf -sW a.o | c++filt | grep putByIndexBeyondVectorLengthWithoutAttributes
   505: 00000000   224 FUNC    WEAK   DEFAULT  128 void
JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes<(unsigned
char)20>(JSC::ExecState*, unsigned int, JSC::JSValue)
   507: 00000000   252 FUNC    WEAK   DEFAULT  138 void
JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes<(unsigned
char)22>(JSC::ExecState*, unsigned int, JSC::JSValue)
   510: 00000000   224 FUNC    WEAK   DEFAULT  147 void
JSC::JSObject::putByIndexBeyondVectorLengthWithoutAttributes<(unsigned
char)26>(JSC::ExecState*, unsigned int, JSC::JSValue)


version I am at is gcc version 5.0.0 20150301 (experimental) (GCC)



More information about the Gcc-bugs mailing list