In Arguments::check_vm_args_consistency() there is code that verifies the values of different flags. Some GC specific flags are only checked if the relevant GC is enabled. However, it's not until later that we decide on which GC to use.
If no GC is set on the command line we will start with UseParallelGC=false, we then skip verification of a bunch of flags. Later we decide that we run on a server class machine and set UseParallelGC=true.
For instance we can start with YoungGenerationSizeIncrement=100000 which will mess with adaptive size policy that expects this to be a percentage (0-100).
There are also flags, for instance ParGCCardsPerStrideChunk that are only checked if we run ParallelGC but are then used by CMS. Setting ParGCCardsPerStrideChunk=0 with CMS will crash the JVM.