1 /* { dg-do compile } */
2 /* { dg-options "-Os -fno-strict-overflow" } */
4 typedef unsigned char u8
;
5 typedef unsigned short u16
;
6 typedef unsigned int u32
;
7 typedef u16 acpi_rs_length
;
8 typedef u32 acpi_rsdesc_size
;
9 struct acpi_resource_source
15 acpi_rs_strcpy (char *destination
, char *source
)
18 for (i
= 0; source
[i
]; i
++)
21 return ((u16
) (i
+ 1));
25 acpi_rs_get_resource_source (acpi_rs_length resource_length
,
26 acpi_rs_length minimum_length
,
27 struct acpi_resource_source
* resource_source
,
28 union aml_resource
* aml
, char *string_ptr
)
30 acpi_rsdesc_size total_length
;
31 u8
*aml_resource_source
;
32 if (total_length
> (acpi_rsdesc_size
) (minimum_length
+ 1))
34 resource_source
->string_length
=
35 acpi_rs_strcpy (resource_source
->string_ptr
,
36 ((char *) (void *) (&aml_resource_source
[1])));