c++: Add fixed test [PR91506]

Pre-r11-557 we issued a bogus

  error: parameter may not have variably modified type 'double [x]'

but now we compile this, as we should.

gcc/testsuite/ChangeLog:

	PR c++/91506
	* g++.dg/init/array60.C: New test.
This commit is contained in:
Marek Polacek 2020-12-10 15:34:19 -05:00
parent 4f1d8bd509
commit 96a5c483af
1 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,8 @@
// PR c++/91506
double
test(int *arr, int x)
{
double ret(double(arr[x]) + 1);
return ret;
}