First Last Prev Next    No search results available
Details
: [llvm-g++] Pointer to member initializers not supported i...
Bug#: 152
: tools
: llvm-g++
Status: RESOLVED
Resolution: FIXED
: All
: All
: 1.0
: P2
: normal
: 1.1

:
: compile-fail
:
:
  Show dependency tree - Show dependency graph
People
Reporter: John T. Criswell <criswell@uiuc.edu>
Assigned To: Chris Lattner <sabre@nondot.org>

Attachments
Program that triggers the assertion. (2.29 KB, text/plain)
2003-11-24 16:41, John T. Criswell
Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2003-11-24 16:40
The llvm-g++ program crashes with the following assertion:

cc1plus: ../../gcc-3.4/gcc/llvm-expand.c:3198: llvm_expand_constructor_element:
Assertion `((enum tree_code) (value)->common.code) == CONSTRUCTOR || ((enum
tree_code) (value)->common.code) == STRING_CST' failed.
/home/vadve/criswell/assert.cpp: In function `int evaluateCentralControl()':
/home/vadve/criswell/assert.cpp:61: internal compiler error: Aborted

The offending file will be attached.
------- Comment #1 From John T. Criswell 2003-11-24 16:41:39 -------
Created an attachment (id=38) [details]
Program that triggers the assertion.

This file comes from junfa-0.0.2 (source file Evaluator.cpp and it's associated
header files).
------- Comment #2 From Chris Lattner 2003-11-25 18:22:03 -------
Fixed.  Here's the patch:

]$ diff -u llvm-expand.c~ llvm-expand.c
--- llvm-expand.c~      2003-11-25 02:38:39.000000000 -0600
+++ llvm-expand.c       2003-11-25 18:19:27.000000000 -0600
@@ -3505,7 +3505,7 @@
     /* Store each element of the constructor into the corresponding element of
        TARGET, determined by counting the elements.  */
     for (elt = CONSTRUCTOR_ELTS (exp); elt; elt = TREE_CHAIN (elt)) {
-      tree value = TREE_VALUE (elt);
+      tree value = lang_hooks.expand_constant(TREE_VALUE(elt));
       tree index = TREE_PURPOSE (elt);
 
       if (index && TREE_CODE(index) == RANGE_EXPR) {

I didn't check in a testcase, because I was able to fix this without reducing
the program.

-Chris

First Last Prev Next    No search results available