Check if any of loop's insides returns 1 and hold it until the whole loop is 0 again
First, you should really not use a global variable to get the result of your comparison function. That is only confusion and unnecessary complicated code. For that we have return values. So instead of setting the compareVar variable inside the timeCompare() function, you should just return the corresponding value. In the timeCompare() function replace
compareVar = 1;

with
return 1;

and
compareVar = 0;

with
return 0;

Then in your main code: As I understood, you only need compareVar in the for loops, so you could delete the globally defined compareVar and declare it directly before the for loops:
int compareVar = 0;

Now we can do the magic trick. We want to go through our for loops and get a result of 1, if for any of the elements timeCompare() returns 1. For that we just doing an OR operation:
compareVar = compareVar || timeCompare(timeArray[i][j][k][0], timeArray[i][j][k][1], timeArray[i][j][k][2], timeArray[i][j][k][3], timeArray[i][j][k][4], timeArray[i][j][k][5], timeArray[i][j][k][6]);

This is a boolean OR ||. In C++ zero is treated as false, while any other number is treated as true. We are starting with compareVar begin zero. When timeCompare() for the element returns also zero, it stays zero. If it returns 1, compareVar will become 1. If it returns 1 again, it will stay one. If it returns zero, it will stay zero.
So now you can check for compareVar after the for loops. It will be 1, if any of the elements gave you 1.
Similarly you could check for all elements returning 1, if you replace the OR || by an AND &amp;&amp; operation.

Lastly I want to strongly discourage you from using goto. It ignores some important principles and you can easily create really bad code with it. Refer to questions like this one to read more about it. I would say, that in every case you have better ways than goto. Here it seems, that you simply want to go out of both loops. I would pack these loops into a function, so that you could simply use a return statement to get out of them.