r278937 - in /trunk/libgomp: ChangeLog oacc-init.c

frederik@gcc.gnu.org frederik@gcc.gnu.org
Tue Dec 3 14:38:00 GMT 2019


Author: frederik
Date: Tue Dec  3 14:38:54 2019
New Revision: 278937

URL: https://gcc.gnu.org/viewcvs?rev=278937&root=gcc&view=rev
Log:
Validate acc_device_t uses

Check that function arguments of type acc_device_t
are valid enumeration values in all publicly visible
functions from oacc-init.c.

2019-12-03  Frederik Harwath  <frederik@codesourcery.com>

	libgomp/
	* oacc-init.c (acc_known_device_type): Add function.
	(unknown_device_type_error): Add function.
 	(name_of_acc_device_t): Change to call unknown_device_type_error
	on unknown type.
	(resolve_device): Use acc_known_device_type.
 	(acc_init): Fail if acc_device_t argument is not valid.
 	(acc_shutdown): Likewise.
 	(acc_get_num_devices): Likewise.
 	(acc_set_device_type): Likewise.
	(acc_get_device_num): Likewise.
	(acc_set_device_num): Likewise.
 	(acc_on_device): Add comment that argument validity is not checked.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
 

Modified:
    trunk/libgomp/ChangeLog
    trunk/libgomp/oacc-init.c



More information about the Gcc-cvs mailing list