initialize pr94314-3.C counter

The int counter in the main loop was uninitialized, so we might end up
looping a very large number of times before completing successfully.
I suspect that was unintended, so I'm adding a zero initializer.


for  gcc/testsuite/ChangeLog

	* g++.dg/pr94314-3.C: Zero-initialize main loop counter.
This commit is contained in:
Alexandre Oliva 2021-04-03 19:54:39 -03:00 committed by Alexandre Oliva
parent 5bba3415ec
commit ba0f690266

View File

@ -38,7 +38,7 @@ volatile int c = 1;
int
main ()
{
for (int i; i < c; i++)
for (int i = 0; i < c; i++)
{
idx = 0;
delete new B;