Normal Arduino functions such as digitalWrite(), digitalRead() etc will work OK
However, the two boards have different processors so any sketch that uses low level instructions, such as accessing chip registers directly will not work.
A more important consideration is that the Giga is a 3.3V device whilst the Mega is a 5V device so any inputs to the board must take this into account to avoid damaging it
it's really a very different architecture so as long as the code (yours or from libraries) you use is at an abstract layer (away from direct hardware manipulation) or is aware of the GIGA's specifics then you'll be fine.
OK, thanks for the clear statement.
even when I'm not so happy with it.
But clear, Arduino does not build CPUs itself,
they only use them and try to integrate them
in their work environment.
For the HW Problem (3,3V<>5V) I've had an idea: Creating an Level-Shifter-Adapter board, (there are ICs available for that function). Or is it always available somewhere?
That would additional be a protection
for the valuable GIGA-board.