- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to compile f90SQLStructures.f90 from Canaimasoft but get the message that SQL_INTERVAL_STRUCT contains one or more misaligned fields. It is a compulsory warning in Visual Studio .NET 2003 when "unaligned data" are detected and, apparently, a fatal error. I wrote to Canaimasoft who replied that it should not be an obstacle to compilation:"The misalignment warning message can be ignored, it should not stop the compiler from creating the object code. The warning simply means that the record is not aligned in the memory as a multiple of the word size of the system. This would only have an effect on performance. "
Is this an error on the part of the programmer or the compiler?
Is this an error on the part of the programmer or the compiler?
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you are compiling for IA64, it's a fatal error for sure. There's no provision for fixing up alignments at run time. If you're on 32-bit Windows, does the problem depend on whether you give an SSE compilation switch? If you aren't permitted to show us what's going on, this doesn't make a very good subject for forum posting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the hint re SSE compiler switch. I couldn't find it but had some interesting reading doing so. I did find /align:nosequence but it produced a compiler error when I used "VS .NET 2003" in the "Custom Build Step" tab on my Windows 2000 PC.
The following is code that produces the same error:
module Error1
! use f90SQLConstants
integer,parameter:: SQLSMALLINT_KIND=2
integer,parameter:: SQLINTEGER_KIND=4
!SQL structures
Type MGT_STRUCT
SEQUENCE
integer(SQLINTEGER_KIND):: district
integer(SQLINTEGER_KIND):: plntn
End Type MGT_STRUCT
Type PLOT_STRUCT
SEQUENCE
integer(SQLINTEGER_KIND):: dist_plntn
integer(SQLINTEGER_KIND):: PlYr
integer(SQLINTEGER_KIND):: Species
integer(SQLINTEGER_KIND):: Plot_No
integer(SQLINTEGER_KIND):: Tree
end type PLOT_STRUCT
Type PRODUCE_STRUCT
SEQUENCE
integer(SQLINTEGER_KIND)::product_type
integer(SQLSMALLINT_KIND)::product_vol
UNION
MAP
type(MGT_STRUCT)::Distrct_Plntn
END MAP
MAP
type(PLOT_STRUCT)::Distrct_Tree
END MAP
END UNION
END Type PRODUCE_STRUCT
end module Error1
I have found a way of using the provided .obj files so it seems that I can move on - when I can figure out how to debug with 'Kind' type variables!
The following is code that produces the same error:
module Error1
! use f90SQLConstants
integer,parameter:: SQLSMALLINT_KIND=2
integer,parameter:: SQLINTEGER_KIND=4
!SQL structures
Type MGT_STRUCT
SEQUENCE
integer(SQLINTEGER_KIND):: district
integer(SQLINTEGER_KIND):: plntn
End Type MGT_STRUCT
Type PLOT_STRUCT
SEQUENCE
integer(SQLINTEGER_KIND):: dist_plntn
integer(SQLINTEGER_KIND):: PlYr
integer(SQLINTEGER_KIND):: Species
integer(SQLINTEGER_KIND):: Plot_No
integer(SQLINTEGER_KIND):: Tree
end type PLOT_STRUCT
Type PRODUCE_STRUCT
SEQUENCE
integer(SQLINTEGER_KIND)::product_type
integer(SQLSMALLINT_KIND)::product_vol
UNION
MAP
type(MGT_STRUCT)::Distrct_Plntn
END MAP
MAP
type(PLOT_STRUCT)::Distrct_Tree
END MAP
END UNION
END Type PRODUCE_STRUCT
end module Error1
I have found a way of using the provided .obj files so it seems that I can move on - when I can figure out how to debug with 'Kind' type variables!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you perhaps have the compiler set to turn warnings into errors? Have you enabled the "All" warnings option?
Since you are using the IDE, please go to the Fortran property page for the project, select Command Line, and post what is shown there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The compiler switches are:
/nologo /Zi /Od /warn:all /warn:declarations /warn:unused /warn:ignore_loc /warn:truncated_source /iface:cvf /module:"$(INTDIR)/" /object:"$(INTDIR)/" /traceback /check:bounds /libs:qwin /dbglibs /c
I did include this in the first version but when it didn't register (presumably because I took too long to construct it?) I forgot the second time - sorry.
Warwick
/nologo /Zi /Od /warn:all /warn:declarations /warn:unused /warn:ignore_loc /warn:truncated_source /iface:cvf /module:"$(INTDIR)/" /object:"$(INTDIR)/" /traceback /check:bounds /libs:qwin /dbglibs /c
I did include this in the first version but when it didn't register (presumably because I took too long to construct it?) I forgot the second time - sorry.
Warwick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Get rid of /warn:all

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page