-fpack-struct and #pragma pack(2) are contraditctory instructions.
Yup.
And it seems to be never the intent to allow both.
Seems kinda strong. I'd argue that #pragma's override what is on the command line. This is I think a change from status quo, but status quo is a bug, nothing more.
Is there a patch for this?
No, not that I know of.
If I want to modify the gcc source code,what should I do?
contribute a fix. See the web pages on contributions.