mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-27 08:24:07 +08:00
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:
parent
4f1d8bd509
commit
96a5c483af
8
gcc/testsuite/g++.dg/init/array60.C
Normal file
8
gcc/testsuite/g++.dg/init/array60.C
Normal file
@ -0,0 +1,8 @@
|
||||
// PR c++/91506
|
||||
|
||||
double
|
||||
test(int *arr, int x)
|
||||
{
|
||||
double ret(double(arr[x]) + 1);
|
||||
return ret;
|
||||
}
|
Loading…
Reference in New Issue
Block a user