On 3/23/25 1:55 AM, Simon Martin wrote:
Hi,
On Sat Sep 14, 2024 at 10:00 AM CEST, Jason Merrill wrote:
On 9/13/24 1:31 PM, Simon Martin wrote:
We currently ICE upon the following testcase when using -ftime-report
=== cut here ===
template < int> using __conditional_t = int;
template < typename _Iter >
concept random_access_iterator = requires { new _Iter; };
template < typename _Iterator >
struct reverse_iterator {
using iterator_concept =
__conditional_t< random_access_iterator< _Iterator>>;
};
void RemoveBottom() {
int iter;
for (reverse_iterator< int > iter;;)
;
}
=== cut here ===
The problem is that qualified_namespace_lookup does a plain start() of
the TV_NAME_LOOKUP timer (that asserts that the timer is not already
started). However this timer has already been cond_start()'d in the call
stack - by pushdecl - so the assert fails.
This patch simply ensures that we always conditionally start this timer
(which is done in all other places that use it).
OK, thanks.
Richard B suggested in the ticket to try to backport since that bug can
get in the way of some investigations.
I have checked and the patch applies cleanly on GCC 13 and 14, and tests
are successful for both on x86_64-pc-linux-gnu.
OK for backporting there?
OK.