public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/45793] New: [4.6 Regressions]  Numerous test-suite failures
@ 2010-09-25 19:57 jvdelisle at gcc dot gnu.org
  2010-09-25 22:43 ` [Bug fortran/45793] " jvdelisle at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-09-25 19:57 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regressions]  Numerous test-suite failures
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jvdelisle@gcc.gnu.org


These appear to be on x86-64.

FAIL: gfortran.dg/iso_fortran_env_3.f90  -Os  (internal compiler error)

FAIL: gfortran.dg/iso_fortran_env_4.f90  -O  (internal compiler error)

FAIL: gfortran.dg/use_3.f90  -O  (internal compiler error)

FAIL: gfortran.dg/use_rename_6.f90  -O  (internal compiler error)

FAIL: gfortran.dg/is_iostat_end_eor_1.f90  -Os  (internal compiler error)

etc


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

* [Bug fortran/45793] [4.6 Regressions]  Numerous test-suite failures
  2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
@ 2010-09-25 22:43 ` jvdelisle at gcc dot gnu.org
  2010-09-26  2:11 ` jvdelisle at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-09-25 22:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-09-25 20:01:14 UTC ---
Others can not confirm this so I am checking local configuration.


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

* [Bug fortran/45793] [4.6 Regressions]  Numerous test-suite failures
  2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
  2010-09-25 22:43 ` [Bug fortran/45793] " jvdelisle at gcc dot gnu.org
@ 2010-09-26  2:11 ` jvdelisle at gcc dot gnu.org
  2010-09-26  7:43 ` kkojima at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-09-26  2:11 UTC (permalink / raw)
  To: gcc-bugs

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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-09-25 21:31:56 UTC ---
Resolved by enabling bootstrap


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

* [Bug fortran/45793] [4.6 Regressions]  Numerous test-suite failures
  2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
  2010-09-25 22:43 ` [Bug fortran/45793] " jvdelisle at gcc dot gnu.org
  2010-09-26  2:11 ` jvdelisle at gcc dot gnu.org
@ 2010-09-26  7:43 ` kkojima at gcc dot gnu.org
  2010-09-26 10:27 ` jvdelisle at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: kkojima at gcc dot gnu.org @ 2010-09-26  7:43 UTC (permalink / raw)
  To: gcc-bugs

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

Kazumoto Kojima <kkojima at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2010.09.25 23:16:59
               date|                            |
                 CC|                            |kkojima at gcc dot gnu.org
         Resolution|INVALID                     |
     Ever Confirmed|0                           |1

--- Comment #3 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2010-09-25 23:16:59 UTC ---
I've got similar failures on cross sh4-linux.  gfortran.log says
that f951 segfaults for these tests.  gdb shows that the segfault
happens at

Program received signal SIGSEGV, Segmentation fault.
0x0811130c in create_int_parameter_array (name=<value optimized out>, size=2, 
    value=0x8b18bb0, id=22, module=<value optimized out>, 
    modname=<value optimized out>)
    at ../../ORIG/trunk/gcc/fortran/module.c:5345
5345      e->shape = gfc_get_shape (1);

When building f951, there was a warning

../trunk/gcc/fortran/module.c: In function 'create_int_parameter_array':
../trunk/gcc/fortran/module.c:5346: warning: 'e' may be used uninitialized in
this function

with my fedora environment.  It looks that there is still something wrong.


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

* [Bug fortran/45793] [4.6 Regressions]  Numerous test-suite failures
  2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2010-09-26  7:43 ` kkojima at gcc dot gnu.org
@ 2010-09-26 10:27 ` jvdelisle at gcc dot gnu.org
  2010-09-26 10:42 ` jvdelisle at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-09-26 10:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-09-26 03:33:09 UTC ---
This is the same location I was seeing the failure before. Now I have no
segfault, but valgind shows:

==17145== 48 (32 direct, 16 indirect) bytes in 2 blocks are definitely lost in
loss record 48 of 459
==17145==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
==17145==    by 0xCCBB27: xmalloc (xmalloc.c:147)
==17145==    by 0x4F4504: gfc_getmem (misc.c:37)
==17145==    by 0x4F6E0A: create_int_parameter_array.constprop.22
(module.c:5345)
==17145==    by 0x4F7629: use_iso_fortran_env_module (iso-fortran-env.def:91)
==17145==    by 0x4FBA2E: gfc_use_module (module.c:5541)
==17145==    by 0x4FFCF4: accept_statement (parse.c:1574)
==17145==    by 0x502A8A: parse_spec (parse.c:2588)
==17145==    by 0x504818: parse_progunit (parse.c:3922)
==17145==    by 0x50560B: gfc_parse_file (parse.c:4329)
==17145==    by 0x53CBF7: gfc_be_parse_file (f95-lang.c:242)
==17145==    by 0x83329F: toplev_main (toplev.c:955)
==17145== 

Look at the code. e is declared in the function as typr gfc_expr *
Unfortunately no pointer is ever allocated for it.  It is just luck that it is
not segfaulting!

static void
create_int_parameter_array (const char *name, int size, gfc_expr *value,
                const char *modname, intmod_id module, int id)
{
  gfc_symtree *tmp_symtree;
  gfc_symbol *sym;
  gfc_expr *e;

  tmp_symtree = gfc_find_symtree (gfc_current_ns->sym_root, name);
  if (tmp_symtree != NULL)
    {
      if (strcmp (modname, tmp_symtree->n.sym->module) == 0)
    return;
      else
    gfc_error ("Symbol '%s' already declared", name);
    }

  gfc_get_sym_tree (name, gfc_current_ns, &tmp_symtree, false);
  sym = tmp_symtree->n.sym;

  sym->module = gfc_get_string (modname);
  sym->attr.flavor = FL_PARAMETER;
  sym->ts.type = BT_INTEGER;
  sym->ts.kind = gfc_default_integer_kind;
  sym->attr.use_assoc = 1;
  sym->from_intmod = module;
  sym->intmod_sym_id = id;
  sym->attr.dimension = 1;
  sym->as = gfc_get_array_spec ();
  sym->as->rank = 1;
  sym->as->type = AS_EXPLICIT;
  sym->as->lower[0] = gfc_get_int_expr (gfc_default_integer_kind, NULL, 1);
  sym->as->upper[0] = gfc_get_int_expr (gfc_default_integer_kind, NULL, size); 

  sym->value = value;
  e->shape = gfc_get_shape (1);
  mpz_init_set_ui (e->shape[0], size);
}


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

* [Bug fortran/45793] [4.6 Regressions]  Numerous test-suite failures
  2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2010-09-26 10:27 ` jvdelisle at gcc dot gnu.org
@ 2010-09-26 10:42 ` jvdelisle at gcc dot gnu.org
  2010-09-26 12:31 ` jvdelisle at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-09-26 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-09-26 03:39:17 UTC ---
This patch untested gets rid of the valgrind error I was seeing.

Index: module.c
===================================================================
--- module.c    (revision 164621)
+++ module.c    (working copy)
@@ -5313,7 +5313,6 @@ create_int_parameter_array (const char *name, int
 {
   gfc_symtree *tmp_symtree;
   gfc_symbol *sym;
-  gfc_expr *e;

   tmp_symtree = gfc_find_symtree (gfc_current_ns->sym_root, name);
   if (tmp_symtree != NULL)
@@ -5342,8 +5341,8 @@ create_int_parameter_array (const char *name, int
   sym->as->upper[0] = gfc_get_int_expr (gfc_default_integer_kind, NULL, size); 

   sym->value = value;
-  e->shape = gfc_get_shape (1);
-  mpz_init_set_ui (e->shape[0], size);
+  sym->value->shape = gfc_get_shape (1);
+  mpz_init_set_ui (sym->value->shape[0], size);
 }

Can someone familiar with module.c see if this makes sense for the intended
purpose.  I will start regression testing.


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

* [Bug fortran/45793] [4.6 Regressions]  Numerous test-suite failures
  2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2010-09-26 10:42 ` jvdelisle at gcc dot gnu.org
@ 2010-09-26 12:31 ` jvdelisle at gcc dot gnu.org
  2010-09-26 13:22 ` kkojima at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-09-26 12:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-09-26 04:17:19 UTC ---
The patch in comment 5 regression tests fine on x86-64.

 Kazumoto Kojima, does this patch fix the problem for you?


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

* [Bug fortran/45793] [4.6 Regressions]  Numerous test-suite failures
  2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2010-09-26 12:31 ` jvdelisle at gcc dot gnu.org
@ 2010-09-26 13:22 ` kkojima at gcc dot gnu.org
  2010-09-26 13:44 ` burnus at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: kkojima at gcc dot gnu.org @ 2010-09-26 13:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Kazumoto Kojima <kkojima at gcc dot gnu.org> 2010-09-26 07:41:39 UTC ---
(In reply to comment #6)
>  does this patch fix the problem for you?

Yes.  I've confirmed that all fortran regressions on sh4-unknown-linux-gnu
go away with your patch in #5.


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

* [Bug fortran/45793] [4.6 Regressions]  Numerous test-suite failures
  2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2010-09-26 13:22 ` kkojima at gcc dot gnu.org
@ 2010-09-26 13:44 ` burnus at gcc dot gnu.org
  2010-09-26 15:17 ` jvdelisle at gcc dot gnu.org
  2010-09-26 16:43 ` jvdelisle at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: burnus at gcc dot gnu.org @ 2010-09-26 13:44 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-09-26 07:49:34 UTC ---
(In reply to comment #3)
> When building f951, there was a warning
> 
> ../trunk/gcc/fortran/module.c: In function 'create_int_parameter_array':
> ../trunk/gcc/fortran/module.c:5346: warning: 'e' may be used uninitialized in
> this function

I have never quite understood when -Werror is effective and when not!


(In reply to comment #5)
> This patch untested gets rid of the valgrind error I was seeing.

> @@ -5342,8 +5341,8 @@ create_int_parameter_array (const char *name, int
>    sym->as->upper[0] = gfc_get_int_expr (gfc_default_integer_kind, NULL, size); 
> 
>    sym->value = value;
> -  e->shape = gfc_get_shape (1);
> -  mpz_init_set_ui (e->shape[0], size);
> +  sym->value->shape = gfc_get_shape (1);
> +  mpz_init_set_ui (sym->value->shape[0], size);
>  }

The patch is obvious and OK for committal. Thanks for fixing this stupid
copy-and-paste bug of mine!


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

* [Bug fortran/45793] [4.6 Regressions]  Numerous test-suite failures
  2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2010-09-26 13:44 ` burnus at gcc dot gnu.org
@ 2010-09-26 15:17 ` jvdelisle at gcc dot gnu.org
  2010-09-26 16:43 ` jvdelisle at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-09-26 15:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-09-26 12:30:57 UTC ---
Author: jvdelisle
Date: Sun Sep 26 12:30:54 2010
New Revision: 164631

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164631
Log:
2010-09-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

    PR fortran/45793
    * module.c (create_int_parameter_array): Set the array value shape.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/module.c


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

* [Bug fortran/45793] [4.6 Regressions]  Numerous test-suite failures
  2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2010-09-26 15:17 ` jvdelisle at gcc dot gnu.org
@ 2010-09-26 16:43 ` jvdelisle at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2010-09-26 16:43 UTC (permalink / raw)
  To: gcc-bugs

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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
            Version|unknown                     |4.6.0
         Resolution|                            |FIXED
         AssignedTo|unassigned at gcc dot       |jvdelisle at gcc dot
                   |gnu.org                     |gnu.org
   Target Milestone|---                         |4.6.0

--- Comment #10 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-09-26 12:36:13 UTC ---
Closing


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

end of thread, other threads:[~2010-09-26 12:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-25 19:57 [Bug fortran/45793] New: [4.6 Regressions] Numerous test-suite failures jvdelisle at gcc dot gnu.org
2010-09-25 22:43 ` [Bug fortran/45793] " jvdelisle at gcc dot gnu.org
2010-09-26  2:11 ` jvdelisle at gcc dot gnu.org
2010-09-26  7:43 ` kkojima at gcc dot gnu.org
2010-09-26 10:27 ` jvdelisle at gcc dot gnu.org
2010-09-26 10:42 ` jvdelisle at gcc dot gnu.org
2010-09-26 12:31 ` jvdelisle at gcc dot gnu.org
2010-09-26 13:22 ` kkojima at gcc dot gnu.org
2010-09-26 13:44 ` burnus at gcc dot gnu.org
2010-09-26 15:17 ` jvdelisle at gcc dot gnu.org
2010-09-26 16:43 ` jvdelisle at gcc dot gnu.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).