Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26733 Discussions

warning #6379: The structure contains one or more misaligned fields.

bucaioni__thomas
New Contributor I
370 Views

Apparently, some fields are misaligned but in the source code the indentation is fine. What is the meaning of misalignment?

0 Kudos
1 Solution
mecej4
Black Belt
352 Views

You may be able to rearrange the order of the elements in the structure and add padding (or remove attributes that inhibit padding) to mitigate the alignment problem.

You can use compiler options to turn off the warning.

Unless you have conducted studies to establish that the misalignment problem is significant, however, I'd suggest that you take note of the issue and put it aside.

View solution in original post

3 Replies
mecej4
Black Belt
365 Views

The warning is about misalignment of data in memory when your program is running and accessing the memory locations occupied by members of the structure, not about the alignment of the characters of the source code in a text editor!

Regarding the issues related to misalignment, see, for example, https://en.wikipedia.org/wiki/Data_structure_alignment .

bucaioni__thomas
New Contributor I
357 Views

Is there anything I can do about it?

mecej4
Black Belt
353 Views

You may be able to rearrange the order of the elements in the structure and add padding (or remove attributes that inhibit padding) to mitigate the alignment problem.

You can use compiler options to turn off the warning.

Unless you have conducted studies to establish that the misalignment problem is significant, however, I'd suggest that you take note of the issue and put it aside.

View solution in original post

Reply