View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005439GCC-XMLpublic2007-08-01 11:072015-03-26 11:59
ReporterAron Bierbaum 
Assigned ToBrad King 
PriorityhighSeverityminorReproducibilityalways
StatusresolvedResolutionsuspended 
PlatformOSOS Version
Summary0005439: Explicit Member Template Instantiation
DescriptionI am using gccxml on a large project and I am running into a problem where member template instantiations are not showing up in the output. Calling the template specializations does not even seem to help. I have attached a simple test case that also does not work. I am using the CVS version from February 22 2007. Does anyone have any ideas?
TagsNo tags attached.
Attached Fileszip file icon value.zip [^] (550 bytes) 1969-12-31 19:00
zip file icon value2.zip [^] (601 bytes) 1969-12-31 19:00

 Relationships

  Notes
(0008323)
Brad King (manager)
2007-08-01 11:25

GCC-XML does not seem to be traversing the part of the GCC internal representation that references explicit member template instantiations. This is a bug but I don't know off the top of my head how to get this information.

I do not have time to investigate this in detail now but I can get you started.

Look in gccxml/GCC/gcc/cp/xml.c for the actual xml dump code. The function xml_output_record_type is dumping the outer class template instantiation. The member template instantiation does not get listed as a member even in the internal representation though.

Try this:

gccxml value.h -fxml=value.xml -fdump-translation-unit

This will produce an extra file dumped by GCC itself (with a .tu extension). Look for the "mult" identifer_node in there. From that you can trace back the connectivity of the internal representation. Then look in cp-tree.h for the macro that provides access to the information.
(0008328)
Aron Bierbaum (reporter)
2007-08-01 13:28

You are correct that the class does not list member template instantiations as members currently. It is a slightly larger problem through, the function is never ever placed in the xml. I think that there is something different because I have a class template and a member template. If I eliminate the class template then the function atleast gets put in the xml.
(0008329)
Brad King (manager)
2007-08-01 13:39

I meant that the GCC internal representation does not even list them. The members list internally contains the "template_decl" representing the member template, but for some reason that declaration's list of instantiations is empty. Something strange is going on though because the connectivity seems to be there in the .tu output I mentioned.
(0012251)
Aron Bierbaum (reporter)
2008-06-04 17:36

What is the status of this bug after the move to gcc4.2? It appears that I am seeing the same problems. I don't know if it is related or not but I now get the following output:

"sorry, unimplemented: call_expr cannot be mangled due to a defect in the C++ ABI"
(0012253)
Brad King (manager)
2008-06-04 18:33

I'm not surprised it hasn't changed.

I don't see the call_expr message using the value2.zip example. Can you reproduce this in a small test case? If so, please open a separate bug for it because it is a different issue.
(0038328)
Brad King (manager)
2015-03-26 11:59

As announced here:

 [ANNOUNCE] GCC-XML maintenance moving to Github
 http://thread.gmane.org/gmane.comp.compilers.gccxml/731 [^]
 http://public.kitware.com/pipermail/gccxml/2015-March/003206.html [^]

gccxml will no longer be developed by its original author, who will instead focus on CastXML:

 https://github.com/CastXML/CastXML#readme [^]

The original GCC-XML issue tracker is now closed. In order to facilitate ongoing maintenance by community participants, issues will now be tracked on the Github repository page:

 https://github.com/gccxml/gccxml/issues [^]

 Issue History
Date Modified Username Field Change
2008-06-04 17:36 Aron Bierbaum Note Added: 0012251
2008-06-04 18:33 Brad King Note Added: 0012253
2015-03-26 11:59 Brad King Note Added: 0038328
2015-03-26 11:59 Brad King Status assigned => resolved
2015-03-26 11:59 Brad King Resolution open => suspended


Copyright © 2000 - 2018 MantisBT Team