Add 103_implicit_memmove testcase
which checks that a declaration after TCC implicitely declares an internally used function (memmove here) doesn't create any problem.
This commit is contained in:
		
							parent
							
								
									c07e81b087
								
							
						
					
					
						commit
						85483f321d
					
				
					 2 changed files with 20 additions and 0 deletions
				
			
		
							
								
								
									
										20
									
								
								tests/tests2/103_implicit_memmove.c
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								tests/tests2/103_implicit_memmove.c
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,20 @@
 | 
			
		|||
/* Test that the memmove TCC is emitting for the struct copy
 | 
			
		||||
   and hence implicitely declares can be declared properly also
 | 
			
		||||
   later.  */
 | 
			
		||||
struct S { int a,b,c,d, e[1024];};
 | 
			
		||||
int foo (struct S *a, struct S *b)
 | 
			
		||||
{
 | 
			
		||||
  *a = *b;
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void *memmove(void*,void*,long);
 | 
			
		||||
void foo2 (struct S *a, struct S *b)
 | 
			
		||||
{
 | 
			
		||||
  memmove(a, b, sizeof *a);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int main()
 | 
			
		||||
{
 | 
			
		||||
  return 0;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										0
									
								
								tests/tests2/103_implicit_memmove.expect
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								tests/tests2/103_implicit_memmove.expect
									
										
									
									
									
										Normal file
									
								
							
		Loading…
	
	Add table
		
		Reference in a new issue