- n = get_compound_ent_n_values(left);
- n_r = get_compound_ent_n_values(right);
- if (n_r < n)
- n = n_r;
- for (i = 0; i < n; ++i) {
- ir_node *irn;
- long v_l, v_r;
- tarval *tv;
-
- irn = get_compound_ent_value(left, i);
- if (! is_Const(irn))
- return NULL;
- tv = get_Const_tarval(irn);
- v_l = get_tarval_long(tv);
-
- irn = get_compound_ent_value(right, i);
- if (! is_Const(irn))
- return NULL;
- tv = get_Const_tarval(irn);
- v_r = get_tarval_long(tv);
+ if (!has_entity_initializer(left) && !has_entity_initializer(right)) {
+ /* code that uses deprecated compound_graph_path stuff */
+
+ n = get_compound_ent_n_values(left);
+ n_r = get_compound_ent_n_values(right);
+ if (n_r < n)
+ n = n_r;
+ res = 0;
+ for (i = 0; i < n; ++i) {
+ ir_node *irn;
+ long v_l, v_r;
+ tarval *tv;
+
+ irn = get_compound_ent_value(left, i);
+ if (! is_Const(irn))
+ return NULL;
+ tv = get_Const_tarval(irn);
+ v_l = get_tarval_long(tv);
+
+ irn = get_compound_ent_value(right, i);
+ if (! is_Const(irn))
+ return NULL;
+ tv = get_Const_tarval(irn);
+ v_r = get_tarval_long(tv);
+
+ if (v_l < v_r) {
+ res = -1;
+ break;
+ }
+ if (v_l > v_r) {
+ res = +1;
+ break;
+ }