First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 28677
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: Werner Van Belle <werner.van.belle@gmail.com>
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
ccH8vLQj.out The preprocessed source text/plain 2006-08-10 12:20 11.51 KB Edit
gcc41-pr27793.patch gcc41-pr27793.patch patch 2006-08-12 19:45 3.73 KB Edit | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 28677 depends on: 16792 26757 Show dependency tree
Show dependency graph
Bug 28677 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: 2006-08-10 19:42 Opened: 2006-08-10 12:19
werner@dig:~$ gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --with-tune=i686
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20060729 (prerelease) (Debian 4.1.1-10)

I currently use the latest Debian unstable system.

werner@dig~$ g++ -O3 -g crasher.cpp
crasher.cpp: In function 'float betai(float, float, float)':
crasher.cpp:43: internal compiler error: in add_AT_specification, at
dwarf2out.c:5048
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-4.1/README.Bugs>.
Preprocessed source stored into /tmp/ccH8vLQj.out file, please attach this to
your bugreport.

the preprocessed source will be attached.

------- Comment #1 From Werner Van Belle 2006-08-10 12:20 -------
Created an attachment (id=12057) [edit]
The preprocessed source

------- Comment #2 From Werner Van Belle 2006-08-10 12:25 -------
The bug does not occur without the -g option.

------- Comment #3 From Martin Michlmayr 2006-08-10 19:42 -------
Fails with 4.0 and 4.1, works with 3.4 and 4.2.

------- Comment #4 From Martin Michlmayr 2006-08-10 19:49 -------
{
  __inline double fabs (double __x) throw ()
  {
  }
  typedef struct
  {
  }
   *__locale_t;
  extern void exit (int __status) throw () __attribute__ ((__noreturn__));
}
void
nrerror (char error_text[])
{
  exit (1);
}
float
betacf (float a, float b, float x)
{
  void nrerror (char error_text[]);
  float aa, c, d, del, h, qab, qam, qap;
  d = 1.0 - qab * x / qap;
  if (fabs (d) < 1.0e-30)
  h = d;
    {
      if (fabs (d) < 1.0e-30)
        d = 1.0e-30;
    }
  return h;
}
float
betai (float a, float b, float x)
{
  void nrerror (char error_text[]);
    nrerror ("Bad x in routine betai");
}

------- Comment #5 From Martin Michlmayr 2006-08-10 20:18 -------
Further reduced:

double fabs (double __x) { }
extern void exit (int __status);
void
nrerror (void)
{
  exit(0);
}
float
betacf (float x)
{
  void nrerror (void);
  float d, h;
  d = 1.0 - x;
  if (fabs (d) < 1.0e-30)
    h = d;
  return h;
}
void
betai (void)
{
  void nrerror (void);
  nrerror ();
}

------- Comment #6 From Andrew Pinski 2006-08-10 20:19 -------
I bet this was fixed by the patch which fixed PR 26757 finnally (comment #28).

------- Comment #7 From Martin Michlmayr 2006-08-10 20:44 -------
(In reply to comment #6)
> I bet this was fixed by the patch which fixed PR 26757 finnally (comment #28).

I can confirm this.

------- Comment #8 From Martin Michlmayr 2006-08-10 20:51 -------
(In reply to comment #7)
> (In reply to comment #6)
> > I bet this was fixed by the patch which fixed PR 26757 finnally (comment #28).
> 
> I can confirm this.

Jakub, can you apply your patch for PR 26757 to 4.0 and 4.1?

------- Comment #9 From Janis Johnson 2006-08-10 23:15 -------
In case Jakub's patch can't be backported easily, this might be useful.  A
regression hunt on powerpc-linux identified the following patch as the start of
failures for the testcase in comment #5:

    http://gcc.gnu.org/viewcvs?view=rev&rev=83405

    r83405 | zack | 2004-06-20 08:34:54 +0000 (Sun, 20 Jun 2004)

------- Comment #10 From Andrew Pinski 2006-08-10 23:25 -------
(In reply to comment #9) 
>     http://gcc.gnu.org/viewcvs?view=rev&rev=83405

Not really, it was this part that caused it:
        * name-lookup.c (pushdecl): When a local extern shadows a
        file-scope declaration of the same object, give both DECLs the
        same DECL_UID.

Which I was semi expecting.
And this is related to PR 16792.

------- Comment #11 From Jakub Jelinek 2006-08-12 19:45 -------
Created an attachment (id=12071) [edit]
gcc41-pr27793.patch

It certainly can be backported easily, I'm using this patch on top of
redhat/gcc-4_1-branch for 2 months already, in the mean time recompiled
the whole distribution with it etc.
Not sure about 4.0 branch though.
I'll bootstrap/regression test this on vanilla gcc-4_1-branch and post for
approval.

------- Comment #12 From Jakub Jelinek 2006-08-13 19:26 -------
Subject: Bug 28677

Author: jakub
Date: Sun Aug 13 20:26:38 2006
New Revision: 116115

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=116115
Log:
2006-08-13  Andrew MacLeod  <amacleod@redhat.com>

        PR middle-end/27793
        * tree-dfa.c (add_referenced_var): Assert DECL_UID is unique for
        different decls.

2006-08-13  Jakub Jelinek  <jakub@redhat.com>

        PR c++/28677
        PR middle-end/27793
        * cp-tree.h (cxx_int_tree_map): New struct.
        (struct language_function): Add extern_decl_map field.
        * name-lookup.c (pushdecl_maybe_friend): Add x -> t mapping
        to cp_function_chain->extern_decl_map hash table instead of
        copying over DECL_UID.
        * cp-gimplify.c (cxx_int_tree_map_eq, cxx_int_tree_map_hash): New
        functions.
        (cp_genericize_r): Remap DECL_EXTERN local decls using
        cp_function_chain->extern_decl_map hash table.
        * decl.c (finish_function): Clear extern_decl_map.

        Revert:
        2006-06-06  Andrew MacLeod  <amacleod@redhat.com>
        PR middle-end/27793
        * tree-dfa.c (referenced_vars_dup_list): New.  List of duplicate 
        referenced_variables with matching DECL_UID's.
        (find_referenced_vars): Make sure duplicate list is empty to start.
        (add_referenced_var): Add var to duplicate list if required.
        * tree-ssa.c (delete_tree_ssa): Clear var_ann's on duplicates.
        * tree-flow.h (referenced_vars_dup_list): External declaration.

        PR c++/26757
        PR c++/27894
        * g++.dg/tree-ssa/pr26757.C: New test.
        * g++.dg/tree-ssa/pr27894.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/tree-ssa/pr26757.C
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/tree-ssa/pr27894.C
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/cp-gimplify.c
    branches/gcc-4_1-branch/gcc/cp/cp-tree.h
    branches/gcc-4_1-branch/gcc/cp/decl.c
    branches/gcc-4_1-branch/gcc/cp/name-lookup.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/tree-dfa.c
    branches/gcc-4_1-branch/gcc/tree-flow.h
    branches/gcc-4_1-branch/gcc/tree-ssa.c

------- Comment #13 From Andrew Pinski 2006-08-16 05:37 -------
Fixed in 4.0.4.

------- Comment #14 From Andrew Pinski 2006-08-16 05:38 -------
(In reply to comment #13)
> Fixed in 4.0.4.
I mean 4.1.2.

------- Comment #15 From Gabriel Dos Reis 2007-02-03 18:45 -------
Fixed in GCC-4.1.2.

First Last Prev Next    No search results available      Search page      Enter new bug