Bug 17631 - libfortran: intrinsic subroutine MVBITS not implemented
: libfortran: intrinsic subroutine MVBITS not implemented
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: libfortran
: 4.0.0
: P2 normal
: 4.0.0
Assigned To: Not yet assigned to anyone
:
: patch
:
:
  Show dependency treegraph
 
Reported: 2004-09-23 10:56 UTC by Harald Anlauf
Modified: 2004-10-04 21:19 UTC (History)
2 users (show)

See Also:
Host: i686-pc-cygwin
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-09-23 13:40:07


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Harald Anlauf 2004-09-23 10:56:12 UTC
Hi,

MVBITS appears to not to be implemented.

program gfcbug13
  implicit none
  integer :: to
  to = 0
  call mvbits (from=1, frompos=0, len=1, to=to, topos=1)
  if (to /= 2) then
     print *, "Error, TO =", to
  end if
end program gfcbug13


The example fails to link with error message:

gfcbug13.f90: undefined reference to `__gfortran_mvbits'
collect2: ld returned 1 exit status

Cheers,
-ha
Comment 1 Andrew Pinski 2004-09-23 13:40:06 UTC
Confirmed.
Comment 2 Andrew Pinski 2004-09-23 18:53:01 UTC
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02414.html>.
Comment 3 Tobias Schlüter 2004-09-23 19:11:09 UTC
Patch as posted is wrong, but the followup has the fix.
Comment 4 CVS Commits 2004-10-04 20:49:44 UTC
Subject: Bug 17631

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	tobi@gcc.gnu.org	2004-10-04 20:49:39

Modified files:
	gcc/fortran    : ChangeLog intrinsic.c intrinsic.h iresolve.c 
	libgfortran    : ChangeLog Makefile.am Makefile.in 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gfortran.fortran-torture/execute: 
	                                                intrinsic_mvbits.f90 

Log message:
	PR fortran/17631
	fortran/
	* intrinsic.c (add_sym_5): Remove.
	(add_subroutines): Add resolution function for MVBITS.
	* intrinsic.h (gfc_resolve_mvbits): Declare resolution function for
	MVBITS
	* iresolve.c (gfc_resolve_mvbits): New function.
	(gfc_resolve_random_number): Remove empty line at end of function.
	libgfortran/
	* Makefile.am (gfor_helper_src): Add intrinsics/mvbits.h.
	* intrinsics/mvbits.h: New file.
	testsuite/
	* gfortran.fortran-torture/execute/intrinsic_mvbits.f90: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.223&r2=1.224
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.c.diff?cvsroot=gcc&r1=1.23&r2=1.24
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/intrinsic.h.diff?cvsroot=gcc&r1=1.16&r2=1.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/iresolve.c.diff?cvsroot=gcc&r1=1.18&r2=1.19
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.97&r2=1.98
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/Makefile.am.diff?cvsroot=gcc&r1=1.18&r2=1.19
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/Makefile.in.diff?cvsroot=gcc&r1=1.18&r2=1.19
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4383&r2=1.4384
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_mvbits.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 5 Tobias Schlüter 2004-10-04 21:03:34 UTC
Fixed.