#2426: g++-10 possibly miscompiles parts of Carpet
| Reporter: | Roland Haas |
| Status: | new |
| Milestone: | |
| Version: | |
| Type: | bug |
| Priority: | major |
| Component: | Other |
Comment (by Erik Schnetter):
Yes, this code looks fishy. I looked for static variables, but I didn’t see this mutable one. Creating the iterator is expensive, hence this memoized variables.
The best way to rewrite this would be to add an explicit conversion (calling serialise) to a new type that has a cheap iterator (iter_memo_t). That requires rewriting all callers to begin and end, but that shouldn’t be too bad because it only makes expensive operations explicit.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2426/g-10-possibly-miscompiles-parts-of-carpet