PIC32 GPIO pins Hardware Abstraction Layer question
I think the real problem may lie in that you don't have your struct layed out correctly to include each sfr's atomic instruction sfr.  In MplabX you can ctrl click on an sfr like PORTA to go to the header.  For example, for a PIC32MM series, I get this

extern volatile __LATAbits_t LATAbits __asm__ ("LATA") __attribute__((section("sfrs"), address(0xBF802630)));
extern volatile unsigned int        LATACLR __attribute__((section("sfrs"),address(0xBF802634)));
extern volatile unsigned int        LATASET __attribute__((section("sfrs"),address(0xBF802638)));
extern volatile unsigned int        LATAINV __attribute__((section("sfrs"),address(0xBF80263C)));


So to do this correctly, your struct definition should be something like

typedef struct {
     volatile unsigned int TRIS; //direction register - offset 0x0000
     volatile unsigned int TRISCLR;
     volatile unsigned int TRISSET;
     volatile unsigned int TRISINV;
     volatile unsigned int PORT; //input data register
     volatile unsigned int PORTCLR;
     volatile unsigned int PORTSET;
     volatile unsigned int PORTINV;
     volatile unsigned int LAT;  //output data register
     volatile unsigned int LATCLR;
     volatile unsigned int LATSET;
     volatile unsigned int LATINV;
     volatile unsigned int ODC;  //open drain register
     volatile unsigned int ODCCLR;
     volatile unsigned int ODCSET;
     volatile unsigned int ODCINV;
} GPIO_TypeDef;    //gpio type definitions


also as a bonus answer to extend my comment, you must use the atomic instructions with the pic32 or cross interrupt writes to latches will be corrupted due to read modify writes. So to correct your examples, they should be something like

#define PIN_SET(port, pin) port-&gt;LATSET = (1UL &lt;&lt; pin) //set pins on port
#define PIN_CLR(port, pin) port-&gt;LATCLR = (1UL &lt;&lt; pin) //clear pins on port
#define PIN_FLP(port, pin) port-&gt;LATINV = (1UL &lt;&lt; pin) //flip pins on port


kkrambo's answer deserves some mention here, as it has shades of the correct answer.