Since the term is recursive, let’s try expanding it out to various levels and see what happens. (My logic may be flawed in the following steps - please watch it carefully for me!)
To get a clear look at this, let’s call the overall statement S’, and then only consider the lines of the truth tables of the expanded statement where S has the same truth value as S’.
Level 0:
S’ = S -> G
Truth Table for Level 0:
S G S’
T T T
T F F
F T T
F F T
At level 0, it appears that G must be true, since the only line where S <=> S’ is one where G is true.
Level 1:
S’ = (S -> G) -> G
Truth Table for Level 1:
S G S’
T T T
T F T
F T T
F F F
At level 1, it appears that G can be either true or false, since there are lines in the truth table where S <=> S’ where G is true, and others where G is false.
Level 2:
S’ = ((S -> G) -> G) -> G
Truth Table for Level 2:
S G S’
T T T
T F F
F T T
F F T
It appears that at level 2 G can only be true, since that is the only line in the truth table where S’ <=> S.
If we continue doing this, we find that it alternates between G having to be true and G not having to be true. I’m not entirely sure what to make of this, but I have some suggestions.
We can say that since all of these are valid deductions from the initial statement, then if we allow S’ to be equivalent to S we are creating a statement with some form of contradiction. This contradiction doesn’t appear to be at the propositional level - that is, we aren’t deriving G to be T & F. The contradiction appears to be at the modal level. That is, this proposition (if we want to call it that) is both necessarily true and not necessarily true.
How logicians deal with this sort of thing I have no idea. I suspect they would treat it like any other self-contradictory statement.
Another way of looking at it is to say that we must expand it infinitely in order to determine whether G is necessarily true or not. This leads to the question, “Would an infinite number of expansions be odd or even?” This appears to me to be about the same as asking how many angels can disco on the head of a pin.