public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/26246]  New: regression from 4.1 to trunk with TREE_STATIC designation.
@ 2006-02-13  0:00 kargl at gcc dot gnu dot org
  2006-02-13  0:01 ` [Bug fortran/26246] " kargl at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: kargl at gcc dot gnu dot org @ 2006-02-13  0:00 UTC (permalink / raw)
  To: gcc-bugs




-- 
           Summary: regression from 4.1 to trunk with TREE_STATIC
                    designation.
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kargl at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] regression from 4.1 to trunk with TREE_STATIC designation.
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
@ 2006-02-13  0:01 ` kargl at gcc dot gnu dot org
  2006-02-13  0:13 ` pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: kargl at gcc dot gnu dot org @ 2006-02-13  0:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kargl at gcc dot gnu dot org  2006-02-13 00:01 -------
module st
  implicit none
  contains
    FUNCTION escape_token(string)
    CHARACTER(*), INTENT(IN) :: string
    CHARACTER(LEN=LEN(string)+2) :: escape_token
    IF (INDEX(TRIM(string), '"').NE.0) THEN
      escape_token = "'" // TRIM(string) // "'"
    END IF
  END FUNCTION escape_token
end module st

kargl[237] nm st.o | more
00000000 B ..__result
00000000 T __st__escape_token
         U _gfortran_concat_string
         U _gfortran_copy_string
         U _gfortran_internal_free
         U _gfortran_internal_malloc
         U _gfortran_string_index
         U _gfortran_string_trim


-fdump-tree-original shows

escape_token (__result, .__result, string, _string)
{
  static int4 ..__result;

The "static" looks bad.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] regression from 4.1 to trunk with TREE_STATIC designation.
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
  2006-02-13  0:01 ` [Bug fortran/26246] " kargl at gcc dot gnu dot org
@ 2006-02-13  0:13 ` pinskia at gcc dot gnu dot org
  2006-02-13  0:22 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-13  0:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-02-13 00:13 -------
495           /* TODO: Don't set sym->module for result or dummy variables.  */
496           gcc_assert (current_function_decl == NULL_TREE || sym->result ==
sym);
497           /* This is the declaration of a module variable.  */
498           TREE_PUBLIC (decl) = 1;
499           TREE_STATIC (decl) = 1;

that is where we set the decl's public and static flags, that seems wrong.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] regression from 4.1 to trunk with TREE_STATIC designation.
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
  2006-02-13  0:01 ` [Bug fortran/26246] " kargl at gcc dot gnu dot org
  2006-02-13  0:13 ` pinskia at gcc dot gnu dot org
@ 2006-02-13  0:22 ` pinskia at gcc dot gnu dot org
  2006-02-13  0:24 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-13  0:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-02-13 00:22 -------
We are passing the wrong symbol to gfc_finish_var_decl, we are passing the
symbol for the function and not the result.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] regression from 4.1 to trunk with TREE_STATIC designation.
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-02-13  0:22 ` pinskia at gcc dot gnu dot org
@ 2006-02-13  0:24 ` pinskia at gcc dot gnu dot org
  2006-02-13  0:33 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-13  0:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-02-13 00:24 -------
This is in gfc_get_fake_result_decl.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] regression from 4.1 to trunk with TREE_STATIC designation.
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-02-13  0:24 ` pinskia at gcc dot gnu dot org
@ 2006-02-13  0:33 ` pinskia at gcc dot gnu dot org
  2006-02-13  1:19 ` [Bug fortran/26246] [4.2 Regression] " pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-13  0:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2006-02-13 00:33 -------
110653      jakub       if (TREE_CODE (length) == VAR_DECL
110653      jakub         && DECL_CONTEXT (length) == NULL_TREE)
110653      jakub       gfc_finish_var_decl (length, sym);


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] [4.2 Regression] from 4.1 to trunk with TREE_STATIC designation.
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-02-13  0:33 ` pinskia at gcc dot gnu dot org
@ 2006-02-13  1:19 ` pinskia at gcc dot gnu dot org
  2006-02-13  9:11 ` [Bug fortran/26246] [4.2 Regression] return string length is being marked as TREE_STATIC and TREE_PUBLIC jakub at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-13  1:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-02-13 01:19 -------
Confirmed.
here is the patch which fixes this testcase for me:
Index: trans-decl.c
===================================================================
--- trans-decl.c        (revision 110867)
+++ trans-decl.c        (working copy)
@@ -1779,7 +1779,7 @@ gfc_get_fake_result_decl (gfc_symbol * s
        length = sym->ts.cl->backend_decl;
       if (TREE_CODE (length) == VAR_DECL
          && DECL_CONTEXT (length) == NULL_TREE)
-       gfc_finish_var_decl (length, sym);
+       gfc_add_decl_to_function (length);
     }

   if (gfc_return_by_reference (sym))


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |link-failure, wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2006-02-13 01:19:12
               date|                            |
            Summary|regression from 4.1 to trunk|[4.2 Regression] from 4.1 to
                   |with TREE_STATIC            |trunk with TREE_STATIC
                   |designation.                |designation.
   Target Milestone|---                         |4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] [4.2 Regression] return string length is being marked as TREE_STATIC and TREE_PUBLIC
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-02-13  1:19 ` [Bug fortran/26246] [4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-02-13  9:11 ` jakub at gcc dot gnu dot org
  2006-02-13 14:25 ` jakub at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-02-13  9:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jakub at gcc dot gnu dot org  2006-02-13 09:11 -------
Looks good to me.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] [4.2 Regression] return string length is being marked as TREE_STATIC and TREE_PUBLIC
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-02-13  9:11 ` [Bug fortran/26246] [4.2 Regression] return string length is being marked as TREE_STATIC and TREE_PUBLIC jakub at gcc dot gnu dot org
@ 2006-02-13 14:25 ` jakub at gcc dot gnu dot org
  2006-02-13 19:21 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-02-13 14:25 UTC (permalink / raw)
  To: gcc-bugs



-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2006-02-13 01:19:12         |2006-02-13 14:25:34
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] [4.2 Regression] return string length is being marked as TREE_STATIC and TREE_PUBLIC
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-02-13 14:25 ` jakub at gcc dot gnu dot org
@ 2006-02-13 19:21 ` pinskia at gcc dot gnu dot org
  2006-02-13 21:31 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-13 19:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2006-02-13 19:20 -------
*** Bug 26265 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bo dot berggren at glocalnet
                   |                            |dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] [4.2 Regression] return string length is being marked as TREE_STATIC and TREE_PUBLIC
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-02-13 19:21 ` pinskia at gcc dot gnu dot org
@ 2006-02-13 21:31 ` jakub at gcc dot gnu dot org
  2006-02-13 21:41 ` pinskia at gcc dot gnu dot org
  2006-02-13 21:48 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-02-13 21:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jakub at gcc dot gnu dot org  2006-02-13 21:31 -------
Subject: Bug 26246

Author: jakub
Date: Mon Feb 13 21:31:18 2006
New Revision: 110929

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110929
Log:
2006-02-13  Andrew Pinski  <pinskia@physics.uc.edu>
            Jakub Jelinek  <jakub@redhat.com>

        PR fortran/26246
        * trans-decl.c (gfc_get_symbol_decl, gfc_get_fake_result_decl): Use
        gfc_add_decl_to_function rather than gfc_finish_var_decl on length.

        * gfortran.dg/pr26246_1.f90: New test.
        * gfortran.dg/pr26246_2.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/pr26246_1.f90
    trunk/gcc/testsuite/gfortran.dg/pr26246_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] [4.2 Regression] return string length is being marked as TREE_STATIC and TREE_PUBLIC
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-02-13 21:31 ` jakub at gcc dot gnu dot org
@ 2006-02-13 21:41 ` pinskia at gcc dot gnu dot org
  2006-02-13 21:48 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-13 21:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2006-02-13 21:41 -------
Fixed.  Thanks Jabuk for taking care of my patch.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/26246] [4.2 Regression] return string length is being marked as TREE_STATIC and TREE_PUBLIC
  2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-02-13 21:41 ` pinskia at gcc dot gnu dot org
@ 2006-02-13 21:48 ` jakub at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2006-02-13 21:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jakub at gcc dot gnu dot org  2006-02-13 21:48 -------
Subject: Bug 26246

Author: jakub
Date: Mon Feb 13 21:48:22 2006
New Revision: 110931

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110931
Log:
2006-02-13  Andrew Pinski  <pinskia@physics.uc.edu>
            Jakub Jelinek  <jakub@redhat.com>

        PR fortran/26246
        * trans-decl.c (gfc_get_symbol_decl, gfc_get_fake_result_decl): Use
        gfc_add_decl_to_function rather than gfc_finish_var_decl on length.

        * gfortran.dg/pr26246_1.f90: New test.
        * gfortran.dg/pr26246_2.f90: New test.

Added:
    branches/redhat/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pr26246_1.f90
    branches/redhat/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pr26246_2.f90
Modified:
    branches/redhat/gcc-4_1-branch/gcc/ChangeLog
    branches/redhat/gcc-4_1-branch/gcc/fortran/trans-decl.c
    branches/redhat/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26246


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-02-13 21:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-13  0:00 [Bug fortran/26246] New: regression from 4.1 to trunk with TREE_STATIC designation kargl at gcc dot gnu dot org
2006-02-13  0:01 ` [Bug fortran/26246] " kargl at gcc dot gnu dot org
2006-02-13  0:13 ` pinskia at gcc dot gnu dot org
2006-02-13  0:22 ` pinskia at gcc dot gnu dot org
2006-02-13  0:24 ` pinskia at gcc dot gnu dot org
2006-02-13  0:33 ` pinskia at gcc dot gnu dot org
2006-02-13  1:19 ` [Bug fortran/26246] [4.2 Regression] " pinskia at gcc dot gnu dot org
2006-02-13  9:11 ` [Bug fortran/26246] [4.2 Regression] return string length is being marked as TREE_STATIC and TREE_PUBLIC jakub at gcc dot gnu dot org
2006-02-13 14:25 ` jakub at gcc dot gnu dot org
2006-02-13 19:21 ` pinskia at gcc dot gnu dot org
2006-02-13 21:31 ` jakub at gcc dot gnu dot org
2006-02-13 21:41 ` pinskia at gcc dot gnu dot org
2006-02-13 21:48 ` jakub at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).