In AIX, if in the main program the global variables are unused then the linker optimises
these variables and the dwarf will not have proper address to the same. Hence we cannot access these
variables.
This patch is a fix to the same so that all the test case of max-depth can passs in AIX as well.
#endif /* __cplusplus */
+void Do_nothing (struct s1 sone)
+{
+ /* This Function does nothing. */
+}
+
int
main ()
{
+ /* In targets like AIX, linker optimises out unused global
+ variables. The do_nothing () function stops the linker
+ from doing so. */
+ Do_nothing (s1);
return 0;
}