+2019-03-06 Nick Bowler <nbowler@draconx.ca>
+
+ PR 24289
+ * ldexp.c (fold_name): Allow lookups of the LENGTH and ORIGIN
+ attributes during the first phase.
+
2019-03-01 Andreas Krebbel <krebbel@linux.ibm.com>
This reverts commit 5a12586d44fa8d5dfc74cbca4f2f36a273a16335.
case LENGTH:
{
- if (expld.phase != lang_first_phase_enum)
- {
- lang_memory_region_type *mem;
-
- mem = lang_memory_region_lookup (tree->name.name, FALSE);
- if (mem != NULL)
- new_number (mem->length);
- else
- einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
- " referenced in expression\n"),
- tree, tree->name.name);
- }
+ lang_memory_region_type *mem;
+
+ mem = lang_memory_region_lookup (tree->name.name, FALSE);
+ if (mem != NULL)
+ new_number (mem->length);
+ else
+ einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
+ " referenced in expression\n"),
+ tree, tree->name.name);
}
break;
case ORIGIN:
- if (expld.phase != lang_first_phase_enum)
- {
- lang_memory_region_type *mem;
-
- mem = lang_memory_region_lookup (tree->name.name, FALSE);
- if (mem != NULL)
- new_rel_from_abs (mem->origin);
- else
- einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
- " referenced in expression\n"),
- tree, tree->name.name);
- }
+ {
+ lang_memory_region_type *mem;
+
+ mem = lang_memory_region_lookup (tree->name.name, FALSE);
+ if (mem != NULL)
+ new_rel_from_abs (mem->origin);
+ else
+ einfo (_("%F%P:%pS: undefined MEMORY region `%s'"
+ " referenced in expression\n"),
+ tree, tree->name.name);
+ }
break;
case CONSTANT: