Patch for bug 47030

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch for bug 47030

Marco Atzeri
I uploaded a patch for 7.3.0, based on previous draft of Tobias,
plus 3 test cases.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47030

With that the dllexport of variable in the common block
now works for this variant of "!GCC$ attributes dllimport"

---------------------------------
$ cat *3.f90
! call_mydll.f90 --
!     Call the library
!
program call_mydll

     real :: x
     common /mydata/ x
     !GCC$ attributes dllimport :: x

     x = 1.0

     call print

     write(*,*) 'In program: X = ', x
end program call_mydll
! mydll.f90 --
!     Simple library (to be compiled and linked as DLL/SO)
!
subroutine print

    real :: x
    common /mydata/ x
!GCC$ attributes dllexport :: x

    write(*,*) 'X = ', x

end subroutine print
------------------------------------

./call_mydll-3.exe
  X =    1.00000000
  In program: X =    1.00000000



---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

Reply | Threaded
Open this post in threaded view
|

Re: Patch for bug 47030

Thomas Koenig-6
Hi Marco,

> I uploaded a patch for 7.3.0, based on previous draft of Tobias,
> plus 3 test cases.

First, thanks for volunteering to fix this!  We welcome any
contribution (there is not danger of running out of bugs to
fix at the moment).

Do you have a copyright assignment to the FSF? We need this to accept
anything but trivial patches. For details, see
https://www.gnu.org/software/gcc/contribute.html .

Finally, for patch submission, there are certain guidelines that
we like to follow. If you read the list, you'll see how it is
done soon enough, but it is also detailed at the link above.

Looking forward to your contributions!

Regards

        Thomas
Reply | Threaded
Open this post in threaded view
|

Re: Patch for bug 47030

Marco Atzeri
Am 03.11.2018 um 15:40 schrieb Thomas Koenig:

> Hi Marco,
>
>> I uploaded a patch for 7.3.0, based on previous draft of Tobias,
>> plus 3 test cases.
>
> First, thanks for volunteering to fix this!  We welcome any
> contribution (there is not danger of running out of bugs to
> fix at the moment).
>
> Do you have a copyright assignment to the FSF? We need this to accept
> anything but trivial patches. For details, see
> https://www.gnu.org/software/gcc/contribute.html .

I have not. Can you send me the form ?

> Finally, for patch submission, there are certain guidelines that
> we like to follow. If you read the list, you'll see how it is
> done soon enough, but it is also detailed at the link above.

the only thing the "check_GNU_style.sh" complains are
space instead of tab. Anything else ?

> Looking forward to your contributions!
>
> Regards
>
>      Thomas

Regards
MArco


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

Reply | Threaded
Open this post in threaded view
|

Re: Patch for bug 47030

Marco Atzeri
In reply to this post by Thomas Koenig-6
Am 03.11.2018 um 07:40 schrieb Thomas Koenig:

> Hi Marco,
>
>> I uploaded a patch for 7.3.0, based on previous draft of Tobias,
>> plus 3 test cases.
>
> First, thanks for volunteering to fix this!  We welcome any
> contribution (there is not danger of running out of bugs to
> fix at the moment).
>
> Do you have a copyright assignment to the FSF? We need this to accept
> anything but trivial patches. For details, see
> https://www.gnu.org/software/gcc/contribute.html .
>
> Finally, for patch submission, there are certain guidelines that
> we like to follow. If you read the list, you'll see how it is
> done soon enough, but it is also detailed at the link above.
>
> Looking forward to your contributions!
>
> Regards
>
>      Thomas

The copyright assignment was completed, and I uploaded a
updated version of the patch

https://gcc.gnu.org/bugzilla/attachment.cgi?id=45348

that passes the check_GNU_style.sh verification.

The previous version was already used for the 7.4.0
cygwin binary.

https://www.cygwin.com/ml/cygwin-announce/2018-12/msg00028.html

Regards
Marco



---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

Reply | Threaded
Open this post in threaded view
|

Re: Patch for bug 47030

Thomas Koenig-6
Hi Marco,

> The copyright assignment was completed, and I uploaded a
> updated version of the patch
>
> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45348
>
> that passes the check_GNU_style.sh verification.

Excellent!

Can you submit the patch using the normal procedure,
with a ChangeLog entry and a test case?

Regards

        Thomas
Reply | Threaded
Open this post in threaded view
|

Re: Patch for bug 47030

Marco Atzeri
Am 06.01.2019 um 07:19 schrieb Thomas Koenig:

> Hi Marco,
>
>> The copyright assignment was completed, and I uploaded a
>> updated version of the patch
>>
>> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45348
>>
>> that passes the check_GNU_style.sh verification.
>
> Excellent!
>
> Can you submit the patch using the normal procedure,
> with a ChangeLog entry and a test case?
>
> Regards
>
>      Thomas

What you mean as test case ?

I put a test in the bug entry as attachment
https://gcc.gnu.org/bugzilla/attachment.cgi?id=44950
but I have no idea how to implement formally for
the build


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus

Reply | Threaded
Open this post in threaded view
|

Re: Patch for bug 47030

Steve Kargl
On Sun, Jan 06, 2019 at 09:02:31AM -0800, Marco Atzeri wrote:

> Am 06.01.2019 um 07:19 schrieb Thomas Koenig:
> > Hi Marco,
> >
> >> The copyright assignment was completed, and I uploaded a
> >> updated version of the patch
> >>
> >> https://gcc.gnu.org/bugzilla/attachment.cgi?id=45348
> >>
> >> that passes the check_GNU_style.sh verification.
> >
> > Excellent!
> >
> > Can you submit the patch using the normal procedure,
> > with a ChangeLog entry and a test case?
> >
> > Regards
> >
> >  Thomas
>
> What you mean as test case ?
>
> I put a test in the bug entry as attachment
> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44950
> but I have no idea how to implement formally for
> the build
>

Marco,

Add the testcase(s) to the gcc/testsuite/gfortran.dg directory.
Either use a descriptive name for the testcase(s) or PR number.  
For example, for this PR you may have

gcc/testsuite/gfortran.dg/pr44950_1.f90
gcc/testsuite/gfortran.dg/pr44950_2.f90

The number of testcases depends on what your patch does.  Here,
pr44950_1.f90 may test that error messages are correctly issued;
while pr44950_2.f90 tests that gfortran produces the correct
result.

I haven't looked at your patch, but suppose you changed
gcc/fortran/resolve.c.  You create your diff by

svn add gcc/testsuite/gfortran.dg/pr44950_1.f90
svn add gcc/testsuite/gfortran.dg/pr44950_2.f90
svn diff gcc/fortran/resolve.c \
   gcc/testsuite/gfortran.dg/pr44950_1.f90 \
   gcc/testsuite/gfortran.dg/pr44950_2.f90 > pr44950.diff

In a separate text file, create the ChangeLog entries that
will be add to gcc/fortran/ChangeLog and gcc/testsuite/ChangeLog
when your patch is actually committed.  ChangeLog entries have
the form

2019-01-06  Your Name  <your_email_address>
<blank line>
<tab>PR fortran/44950
<tab>* resolve.c (name of function changed):  What changed here (be brief).
     (2nd function changed): What changed here.


2019-01-06  Your Name  <your_email_address>
<blank line>
<tab>PR fortran/44950
<tab>* gfortran.dg/pr44950_1.f90: New test.
<tab>* gfortran.dg/pr44950_2.f90: Ditto.

Now, send email to [hidden email] and [hidden email]
with the ChangeLog entries in the body of the email, tell us how
you tested the patch, and include the diff as an attachment.

See https://gcc.gnu.org/ml/fortran/2019-01/msg00015.html


--
Steve