libabigail/tests/data/test-read-dwarf/test4.c
Mark Wielaard 453ed93d01 Handle C99 restrict qualifier and DWARFv3 DW_TAG_restrict_type.
* src/abg-dwarf-reader.cc (build_qualified_type): Handle
	DW_TAG_restrict_type by adding CV_RESTRICT.
	(build_ir_node_from_die): Call build_qualified_type for
	DW_TAG_restrict_type.
	* src/abg-reader.cc (build_qualified_type_decl): Handle
	"restrict" attribute by adding CV_RESTRICT.
	* src/abg-writer.cc (write_qualified_type_def): Output
	"restrict" attribute for CV_RESTRICT.
	* tests/data/test-read-dwarf/test4.c: New test file.
	* tests/data/test-read-dwarf/test4.so: Likewise.
	* tests/data/test-read-dwarf/test4.so.abi: Likewise.
	* tests/data/test-read-write/test24.xml: Likewise.
	* tests/test-read-dwarf.cc (in_out_specs): Add test4.
	* tests/test-read-write.cc (in_out_specs): Add test24.xml.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
2014-06-23 15:55:37 +02:00

15 lines
392 B
C

// Test file for restrict (needs to be compiled by a GCC that actually emits
// DW_TAG_restrict_type. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59051
//
// gcc -gdwarf-3 -std=c99 -shared -nostartfiles -o test4.so test4.c
char *
cpy (char * restrict s1, const char * restrict s2, unsigned int n)
{
char *t1 = s1;
const char *t2 = s2;
while(n-- > 0)
*t1++ = *t2++;
return s1;
}