aboutsummaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorEd Schonberg <schonberg@adacore.com>2018-08-21 14:47:32 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-08-21 14:47:32 +0000
commit41306c0a89a539c97e8eee0867816ea3ae5ab5b7 (patch)
tree349efba350e47ed7e58a62f6175bfb4c3a63ae94 /libgfortran
parent298e0c6bf77b2e218bd5f8a386ecfdd4e7c9ab52 (diff)
downloadgcc-41306c0a89a539c97e8eee0867816ea3ae5ab5b7.zip
gcc-41306c0a89a539c97e8eee0867816ea3ae5ab5b7.tar.gz
gcc-41306c0a89a539c97e8eee0867816ea3ae5ab5b7.tar.bz2
[Ada] Spurious ambiguity error on call returning an access type
If F is a function with a single defaulted parameter that returns an access_to_array type, then F (I) may designate either the return type or an indexing of the result of the call, after implicit dereferencing. If the component type C of the array type AR is accces AR this is ambiguous in a context whose expected type is C. If F is parameterless the call is not ambiguous. 2018-08-21 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_res.adb (Resolve_Call): Resolve correctly a parameterless call that returns an access type whose designated type is the component type of an array, when the function has no defaulted parameters. gcc/testsuite/ * gnat.dg/access5.adb, gnat.dg/access5.ads: New testcase. From-SVN: r263726
Diffstat (limited to 'libgfortran')
0 files changed, 0 insertions, 0 deletions