LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 33419 - Missing diagnostic for function return in private AS
Summary: Missing diagnostic for function return in private AS
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: OpenCL (show other bugs)
Version: trunk
Hardware: PC Linux
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-12 10:13 PDT by Anastasia Stulova
Modified: 2018-01-12 06:09 PST (History)
1 user (show)

See Also:
Fixed By Commit(s):


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anastasia Stulova 2017-06-12 10:13:38 PDT
The following code should compile with an error (spec s6.5):

__private int testFunction(void)
{
	return 42;
}

Note that using any other AS would produce an error.
Comment 1 Anastasia Stulova 2018-01-12 06:09:13 PST
Fixed by commit r315668. The following error is given correctly:
error: return value cannot be qualified with address space