public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/14649] New: atan(1.0) should not be a constant expression
@ 2004-03-19 11:47 jsm28 at gcc dot gnu dot org
  2004-03-19 14:28 ` [Bug middle-end/14649] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2004-03-19 11:47 UTC (permalink / raw)
  To: gcc-bugs

double atan(double);
const double pi = 4*atan(1.0);

should yield an error.  The constraints on constant expressions
prohibit evaluated function calls.  This is a regression in 3.4.

-- 
           Summary: atan(1.0) should not be a constant expression
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jsm28 at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug middle-end/14649] [3.4/3.5 Regression] atan(1.0) should not be a constant expression
  2004-03-19 11:47 [Bug middle-end/14649] New: atan(1.0) should not be a constant expression jsm28 at gcc dot gnu dot org
@ 2004-03-19 14:28 ` pinskia at gcc dot gnu dot org
  2004-05-29 23:27 ` [Bug c/14649] " mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-19 14:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-03-19 14:28 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |accepts-invalid
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-19 14:28:27
               date|                            |
            Summary|atan(1.0) should not be a   |[3.4/3.5 Regression]
                   |constant expression         |atan(1.0) should not be a
                   |                            |constant expression
   Target Milestone|---                         |3.4.1


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


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

* [Bug c/14649] [3.4/3.5 Regression] atan(1.0) should not be a constant expression
  2004-03-19 11:47 [Bug middle-end/14649] New: atan(1.0) should not be a constant expression jsm28 at gcc dot gnu dot org
  2004-03-19 14:28 ` [Bug middle-end/14649] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
@ 2004-05-29 23:27 ` mmitchel at gcc dot gnu dot org
  2004-05-30  1:32 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-05-29 23:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-05-28 22:18 -------
Roger --

Would you care to take a look at this regression?

-- Mark

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at eyesopen dot com


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


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

* [Bug c/14649] [3.4/3.5 Regression] atan(1.0) should not be a constant expression
  2004-03-19 11:47 [Bug middle-end/14649] New: atan(1.0) should not be a constant expression jsm28 at gcc dot gnu dot org
  2004-03-19 14:28 ` [Bug middle-end/14649] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
  2004-05-29 23:27 ` [Bug c/14649] " mmitchel at gcc dot gnu dot org
@ 2004-05-30  1:32 ` pinskia at gcc dot gnu dot org
  2004-06-07 14:17 ` roger at eyesopen dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-30  1:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-28 22:22 -------
This is a front-end issue of not telling the middle-end (fold) that it does not want the functions 
expanded at this point.

-- 


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


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

* [Bug c/14649] [3.4/3.5 Regression] atan(1.0) should not be a constant expression
  2004-03-19 11:47 [Bug middle-end/14649] New: atan(1.0) should not be a constant expression jsm28 at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-05-30  1:32 ` pinskia at gcc dot gnu dot org
@ 2004-06-07 14:17 ` roger at eyesopen dot com
  2004-06-07 18:49 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: roger at eyesopen dot com @ 2004-06-07 14:17 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From roger at eyesopen dot com  2004-06-07 14:17 -------
Proposed patch here: http://gcc.gnu.org/ml/gcc-patches/2004-06/msg00332.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |roger at eyesopen dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c/14649] [3.4/3.5 Regression] atan(1.0) should not be a constant expression
  2004-03-19 11:47 [Bug middle-end/14649] New: atan(1.0) should not be a constant expression jsm28 at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-06-07 14:17 ` roger at eyesopen dot com
@ 2004-06-07 18:49 ` cvs-commit at gcc dot gnu dot org
  2004-06-08 17:15 ` [Bug c/14649] [3.4 " cvs-commit at gcc dot gnu dot org
  2004-06-08 17:52 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-07 18:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-07 18:49 -------
Subject: Bug 14649

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	sayle@gcc.gnu.org	2004-06-07 18:49:38

Modified files:
	gcc            : ChangeLog c-typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr14649-1.c 

Log message:
	PR c/14649
	* c-typeck.c (require_constant_value, require_constant_elements):
	Move declarations to the top of the file.
	(build_function_call): If we require a constant value, fold with
	fold_initializer.  If the result is a constant, and the function
	wasn't called using __builtin_foo, issue a pedantic warning.
	(build_unary_op): If we require a constant value, fold tree with
	fold_initializer.
	(build_binary_op): Use require_constant_value to determine whether
	to call fold or fold_initializer.
	
	* gcc.dg/pr14649-1.c: New test case.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3863&r2=2.3864
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.310&r2=1.311
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3819&r2=1.3820
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14649-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c/14649] [3.4 Regression] atan(1.0) should not be a constant expression
  2004-03-19 11:47 [Bug middle-end/14649] New: atan(1.0) should not be a constant expression jsm28 at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-06-07 18:49 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-08 17:15 ` cvs-commit at gcc dot gnu dot org
  2004-06-08 17:52 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-08 17:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-08 17:15 -------
Subject: Bug 14649

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	sayle@gcc.gnu.org	2004-06-08 17:15:10

Modified files:
	gcc            : ChangeLog c-typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: pr14649-1.c 

Log message:
	PR c/14649
	* c-typeck.c (require_constant_value, require_constant_elements):
	Move declarations to the top of the file.
	(build_function_call): If we require a constant value, fold with
	fold_initializer.  If the result is a constant, and the function
	wasn't called using __builtin_foo, issue a pedantic warning.
	(build_unary_op): If we require a constant value, fold tree with
	fold_initializer.
	(build_binary_op): Use require_constant_value to determine whether
	to call fold or fold_initializer.
	
	* gcc.dg/pr14649-1.c: New test case.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.482&r2=2.2326.2.483
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.272.2.8&r2=1.272.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.200&r2=1.3389.2.201
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/pr14649-1.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.4.1



-- 


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


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

* [Bug c/14649] [3.4 Regression] atan(1.0) should not be a constant expression
  2004-03-19 11:47 [Bug middle-end/14649] New: atan(1.0) should not be a constant expression jsm28 at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-06-08 17:15 ` [Bug c/14649] [3.4 " cvs-commit at gcc dot gnu dot org
@ 2004-06-08 17:52 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-08 17:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-08 17:52 -------
Fixed.

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


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


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

end of thread, other threads:[~2004-06-08 17:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-19 11:47 [Bug middle-end/14649] New: atan(1.0) should not be a constant expression jsm28 at gcc dot gnu dot org
2004-03-19 14:28 ` [Bug middle-end/14649] [3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-05-29 23:27 ` [Bug c/14649] " mmitchel at gcc dot gnu dot org
2004-05-30  1:32 ` pinskia at gcc dot gnu dot org
2004-06-07 14:17 ` roger at eyesopen dot com
2004-06-07 18:49 ` cvs-commit at gcc dot gnu dot org
2004-06-08 17:15 ` [Bug c/14649] [3.4 " cvs-commit at gcc dot gnu dot org
2004-06-08 17:52 ` pinskia 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).