This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: online archive of my book's examples


Janus, 

Did you have ALL_EXAMPLES_ENABLED turned on or off when you built?

Damian

----- Original Message -----
From: Janus Weil [mailto:janus@gcc.gnu.org]
Sent: Monday, September 12, 2011 05:14 AM
To: Rouson, Damian
Cc: fortran@gcc.gnu.org <fortran@gcc.gnu.org>
Subject: Re: online archive of my book's examples

Hi Damian,

> FYI, in case it is of interest for testing purposes, we have released an
> open-source version of the code examples from my book in a form that can
> be built in one line by running a CMake script.

thanks for the notice. This could be really helpful for testing gfortran.

However, I just tried to compile it with GCC 4.7 trunk, and I get some
error in one of the C++ examples:


[ 50%] Building CXX object
chapter05/vortex_cpp/CMakeFiles/superfluid_cpp.dir/main.cpp.o
cd /home/jweil/fort/Damian/online_archive/ssdBuild/chapter05/vortex_cpp
&& /usr/bin/g++-4.7    -g
-I/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/../../chapter06/common_cpp
   -o CMakeFiles/superfluid_cpp.dir/main.cpp.o -c
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/main.cpp
In file included from
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/../../chapter06/common_cpp/RefBase.h:34:0,
                 from
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/vortex.h:30,
                 from
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/main.cpp:28:
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/../../chapter06/common_cpp/Ref.h:
In instantiation of âRef<T>::Ref(Other*) [with Other = vortex, T =
vortex]â:
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/main.cpp:34:44:
  required from here
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/../../chapter06/common_cpp/Ref.h:56:5:
error: âassignâ was not declared in this scope, and no declarations
were found by argument-dependent lookup at the point of instantiation
[-fpermissive]
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/../../chapter06/common_cpp/Ref.h:56:5:
note: declarations in dependent base âpointer<vortex>â are not found
by unqualified lookup
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/../../chapter06/common_cpp/Ref.h:56:5:
note: use âthis->assignâ instead
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/../../chapter06/common_cpp/Ref.h:
In instantiation of âRef<T>::Ref(const Self_t&) [with T = vortex,
Ref<T>::Self_t = Ref<vortex>]â:
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/main.cpp:34:44:
  required from here
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/../../chapter06/common_cpp/Ref.h:44:5:
error: âassignâ was not declared in this scope, and no declarations
were found by argument-dependent lookup at the point of instantiation
[-fpermissive]
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/../../chapter06/common_cpp/Ref.h:44:5:
note: declarations in dependent base âpointer<vortex>â are not found
by unqualified lookup
/home/jweil/fort/Damian/online_archive/ssdSource/chapter05/vortex_cpp/../../chapter06/common_cpp/Ref.h:44:5:
note: use âthis->assignâ instead


I'm not really a C++ expert and I haven't looked into your code in
detail, so I'm not sure if this is a compiler bug or an error in your
code. Do you have an idea?

If I add the -fpermissive flag, the compilation gets a bit further but
then fails again with a similar error later on.



> I think the issues
> those examples identify are ones we have reported to you and the
> corresponding bugs are listed in the archive's top-level README.txt file,
> but if any of you tries to build archive and I can be of help in
> understanding or isolating any issues you find, please let me know.

To summarize it, the missing F03/F08 features are:

 * derived-type 'constructors'
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39427)
 * finalization (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336)
 * non-trivial type-bound operator calls
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46328)
 * allocatable character lengths
(http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45170)
 * coarrays (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18918)

In fact I think it would be nice if we could manage to implement some
of those for the 4.7 release. There were preliminary patches already
for the first two, and I might have a look at the third one soon. Also
I think also coarrays have made a bit of progress on the trunk, but
I'm not sure if it's enough for your examples (I haven't tried it
yet).

Cheers,
Janus


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]