
21 Ariz. App. 78 (1973)
515 P.2d 903
The STATE of Arizona, Appellee,
v.
Michael J. CASSIUS aka Carl Jackson, Appellant.
No. 2 CA-CR 331.
Court of Appeals of Arizona, Division 2.
November 8, 1973.
Rehearing Denied December 11, 1973.
Review Granted January 22, 1974.
*80 Gary K. Nelson, Atty. Gen., Phoenix by Howard L. Fell, Asst. Atty. Gen., Tucson, and Frank Leto, Certified Third-Year Law Student under Rule 28(e), for appellee.
Ed Bolding, Pima County Public Defender by Richard Van Duizend, Asst. Public Defender, Tucson, and Jeffrey W. Hanes, Certified Third-Year Law Student under Rule 28(e), for appellant.
OPINION
KRUCKER, Judge.
This is an appeal from a judgment of conviction and sentences on one count of burglary, first degree, A.R.S. § 13-302, and one count of committing a felony while released on bail or on own recognizance on a separate felony charge, A.R.S. § 13-1580.
The peculiar facts of this case are: On October 17, 1972, appellant, Michael Jerome Cassius, was arrested and charged with burglary, Cause No. A-22479. The following day, he was released on his own recognizance.
On November 4, 1972, while released on his own recognizance on the first burglary charge, appellant was again arrested for burglary and was charged in Cause No. A-22303 on two counts: Count I, violation of A.R.S. § 13-302 (burglary, first degree) and Count II, violation of A.R.S. § 13-1580 (committing a felony while released on bail or on own recognizance on a separate felony charge).
Proceedings were held on both burglary charges on January 4, 1973. At that time, Cause No. A-22479 was dismissed upon motion of the County Attorney. In Cause No. A-22303, appellant plead guilty to Count I, burglary, and Count II was submitted to the court on the basis of the Grand Jury transcript and stipulation of counsel that at the time of the second burglary appellant was released on his own recognizance in Cause No. A-22479. The court accepted appellant's guilty plea on Count I and found him guilty on Count II.
On January 22, 1973, appellant was sentenced to imprisonment for one and not more than two years on Count I and a consecutive term of not less than one nor more than three years was imposed for the Count II conviction. This appeal followed.
Appellant submits two questions for review:
1. Whether appellant's conviction for violation of A.R.S. § 13-1580 (committing a felony while released on bail or on own recognizance) constituted double jeopardy under the Fifth Amendment of the United States Constitution and Art. 2 § 10 A.R.S. of the Arizona Constitution?
2. Whether the sentence imposed pursuant to A.R.S. § 13-1580 violated the statutory proscription of A.R.S. § 13-1641 against double punishment for the same offense?
Before we dispose of the issues raised by appellant, we first consider the State's contention that the issues of double jeopardy and double punishment were not raised below, therefore, are not preserved for appeal. In response to this contention, appellant asserts that the issues are preserved by stipulation of counsel. He also argues that double jeopardy and double punishment affect substantial rights requiring this court on its own initiative to notice the defects. We agree with appellee that the double jeopardy issue is not preserved for appeal. However, we find the issue of double punishment properly submitted for review.
Generally, in Arizona the issue of double jeopardy may not be raised for the first time on appeal. State v. Veres, 7 Ariz. App. 117, 436 P.2d 629 (1968), cert. den., 393 U.S. 1014, 89 S.Ct. 613, 21 L.Ed.2d 559. The purported stipulation relied on by appellant is the following statement of the prosecutor:
"MR. HOWARD: The charge in count 2 is committing a felony while released *81 on his own recognizance on another felony charge, Your Honor, and the public defender would like to reserve their right to examine that Statute on appeal, so are reluctant to enter a plea at this point, and would prefer to submit it to the Court on the stipulated facts in the Grand Jury transcript, and there are certain matters which I will ask the Court to take judicial notice of from the Court file."
We find this insufficient to preserve the double jeopardy issue for review.
Appellant also asserts that he had no opportunity to raise this issue at the trial court level. We find no merit in this argument. Appellant, after having been found guilty on Count I, made no attempt to utilize Rule 177, Rules of Criminal Procedure, 17 A.R.S.[1] as to Count II on the grounds of prior conviction or double jeopardy. Appellant's failure to raise the issue of double jeopardy below precludes appellate consideration of such issue.
As to the issue of double punishment, however, it may be raised for the first time on appeal. State v. Mills, 96 Ariz. 377, 396 P.2d 5 (1964). We therefore turn our attention to appellant's contention that the sentences imposed on Count I and Count II constituted double punishment in violation of A.R.S. § 13-1641, which provides:
"An act or omission which is made punishable in different ways by different sections of the laws may be punished under either, but in no event under more than one. An acquittal or conviction and sentence under either one bars a prosecution for the same act or omission under any other."
Prior to the Supreme Court decisions in State v. Mitchell, 106 Ariz. 492, 478 P.2d 517 (1970), and State v. Tinghitella, 108 Ariz. 1, 491 P.2d 834 (1971), there appeared to be some confusion in applying A.R.S. § 13-1641. However, as formulated in Mitchell, supra, and adopted in Tinghitella, supra, an "identical elements" test is the standard, requiring elimination of the elements in one charge and a determination of whether the facts left support the other charge. See also, State v. Horton, 108 Ariz. 16, 492 P.2d 395 (1972); State v. George, 108 Ariz. 5, 491 P.2d 838 (1971), and State v. Bartky, 16 Ariz. App. 421, 493 P.2d 1226 (1972).
In spite of the seeming simplicity of this statute and the test, judicial interpretation and application to a given set of facts has proven to be a complex task. This case is no exception.
Our review of the myriad of cases dealing with the application of A.R.S. § 13-1641 sheds no light on the problem sub judice. We find no case with a factual posture remotely similar to this case. However, there is one common denominator  the purpose of the subject statute is to protect an offender against double punishment for a single act which violates more than one statute. See, Mitchell, supra; State v. Andrews, 106 Ariz. 372, 476 P.2d 673 (1970); State v. Ballez, 102 Ariz. 174, 427 P.2d 125 (1967), and State v. Hutton, 87 Ariz. 176, 349 P.2d 187 (1960).
As previously noted, appellant, in Cause No. A-22303, was found guilty and sentenced on two counts: Count I, violation of A.R.S. § 13-302, and Count II, violation of A.R.S. § 13-1580. The pertinent provisions of these statutes are:
"§ 13-302. Definition and degrees of burglary; punishment
A. A person entering a building, dwelling house, office, room, apartment, tenement, shop, warehouse, store ... with intent to commit grand or petty theft, or any felony ... is guilty of burglary.
B. Burglary committed in the nighttime is burglary of the first degree, punishable by imprisonment in the state prison for not less than one nor more than fifteen years."

*82 "§ 13-1580. Committing felony while on bail on felony charge; penalty
A person who is convicted of committing any felony offense, whether federal or state, which felony offense is committed while such person is released on bail or his own recognizance on a separate felony charge is guilty of the offense of committing a felony while released on bail or his own recognizance and upon conviction of such crime shall be punished by imprisonment in the state prison for not more than five years. Such penalty shall be in addition to and shall be served consecutively to any penalty imposed for the offense committed while released on bail or on his own recognizance."
The elements necessary to prove burglary, first degree, are: (1) and entry, (2) with intent to commit a felony, and (3) commission in the nighttime. A violation of A.R.S. § 13-1580 requires (1) a conviction of committing any felony, (2) which is committed while a person is released on bail or his own recognizance on a separate felony charge.
Appellant's only act was the burglary of November 4, 1972, which was committed while he was released on his own recognizance on a separate felony charge. For this single act, he has been convicted and sentenced for two felony offenses. If one or all of the elements of burglary are eliminated, what facts are left to support the charge under A.R.S. § 13-1580? There are none. We find no other act by appellant, hence no support for a charge under A.R.S. § 13-1580. The factual basis for conviction under either statute is the same act on the part of appellant.
The State, however, argues that the elements of A.R.S. § 13-1580 are different, i.e., (1) conviction of a felony and (2) such felony having been committed during a designated period. We find such argument specious. The "conviction" element is a judicial act, not appellant's, leaving only the burglary as the act of appellant. To adopt the State's construction would defeat the very purpose of A.R.S. § 13-1641 and allow the prosecution to accomplish indirectly that which cannot be done directly.
Application of the "identical elements" test enunciated by our Supreme Court would mandate the conclusion that the statutory prescription of A.R.S. § 13-1641 has been violated. However, to so hold would render A.R.S. § 13-1580 completely inoperative. We must presume that the legislature did not intend to do a futile act in enacting A.R.S. § 13-1580. Campbell v. Superior Court, 105 Ariz. 252, 462 P.2d 801 (1969). We also assume that the legislature was aware of the existence of A.R.S. § 13-1641 and therefore that A.R.S. §§ 13-1641 and 13-1580 were intended to operate as a compatible whole. See, Arizona State Board of Directors v. Phoenix Union High School District, 102 Ariz. 69, 424 P.2d 819 (1967). It must, therefore, have been the intention of the legislature to except from A.R.S. § 13-1641 the later-enacted A.R.S. § 13-1580. However, whether or not such exception was intended, we are of the opinion that A.R.S. § 13-1580 is violative of the equal protection clause of the 14th Amendment to the United States Constitution.
Initially we note that appellant did not attack the constitutionality of A.R.S. § 13-1580 in the trial court. Generally, constitutional questions must first be presented to the trial court for determination. Porter v. Eyer, 80 Ariz. 169, 294 P.2d 661 (1956). However, fundamental error is such error as goes to the foundation of the case, or which takes from a defendant a right essential to his defense, State v. Pulliam, 87 Ariz. 216, 349 P.2d 781 (1960), and we must search the record for such error in all criminal appeals. State v. Powell, 5 Ariz. App. 51, 423 P.2d 127 (1967). Furthermore, this court on its own initiative should notice defects which affect substantial rights, principally those affecting constitutional rights, solely to prevent a miscarriage of justice. State v. Gilreath, 107 Ariz. 318, 487 P.2d 385 (1971).
*83 As stated in State v. Pugh, 31 Ariz. 317, 252 P. 1018 (1927):
"But where for any constitutional reason the law under which a party is being prosecuted is void, the question need not be formally raised, as when that fact is discovered by the court, even on appeal, it will be considered." 31 Ariz. at 319, 252 P. at 1018.
Therefore, in accordance with our absolute duty to protect constitutional rights, Marquez v. Rapid Harvest Co., 1 Ariz. App. 562, 405 P.2d 814 (1965), and to prevent a miscarriage of justice, we raise the constitutionality of A.R.S. § 13-1580 ex mero motu.
Since this case involves a crime relating to bail and the release of one on his own recognizance, it is important to understand the nature and purpose of bail. In Arizona, bail is a constitutionally protected right. Art. 2 § 22, A.R.S. of the Arizona Constitution provides:
"All persons charged with crime shall be bailable by sufficient sureties, except for:
1. Capital offenses when the proof is evident or the presumption great.
2. Felony offenses, committed when the person charged is already admitted to bail on a separate felony charge and where the proof is evident or the presumption great as to the present charge."
Although bail is conditioned upon the giving of "sufficient sureties," Rendel v. Mummert, 106 Ariz. 233, 474 P.2d 824 (1970), it is nonetheless a constitutionally protected right. As stated in Stack v. Boyle, 342 U.S. 1, 72 S.Ct. 1, 96 L.Ed. 3 (1951):
"This traditional right to freedom before conviction permits the unhampered preparation of a defense, and serves to prevent the infliction of punishment prior to conviction. [Citations omitted] Unless this right to bail before trial is preserved, the presumption of innocence, secured only after centuries of struggle, would lose its meaning." 72 S.Ct. at 3.
Bail is exacted for the sole purpose of securing attendance of the defendant in court at all times when his presence may be lawfully required, and his surrendering himself in execution of any lawful judgment that may be pronounced against him. Gusick v. Boies, 72 Ariz. 309, 234 P.2d 430 (1951). When setting bail, the judge should take into account the defendant's prior arrests and convictions, his record of appearances at court proceedings, his record of flight to avoid prosecution, and his failure to appear at court proceedings. Rendel v. Mummert, supra. It is assumed that the threat of forfeiture of one's goods will be an effective deterrent to the temptation to breach the conditions of one's release. Bandy v. United States, 81 S.Ct. 197, 5 L.Ed.2d 218 (1960).
With this background, we turn to the constitutionality of A.R.S. § 13-1580. The basic principles governing application of the equal protection clause of the Fourteenth Amendment are familiar. As the Chief Justice recently explained in Reed v. Reed, 404 U.S. 71, 92 S.Ct. 251, 30 L.Ed.2d 225 (1971):
"In applying that clause, this Court has consistently recognized that the Fourteenth Amendment does not deny to States the power to treat different classes of persons in different ways. Barbier v. Connolly, 113 U.S. 27, 5 S.Ct. 357, 28 L.Ed. 923 (1885); Lindsley v. Natural Carbonic Gas Co., 220 U.S. 61, 31 S.Ct. 337, 55 L.Ed. 369 (1911); Railway Express Agency v. New York, 336 U.S. 106, 69 S.Ct. 463, 93 L.Ed. 533 (1949); McDonald v. Board of Election Commissioners, 394 U.S. 802, 89 S.Ct. 1404, 22 L.Ed.2d 739 (1969). The Equal Protection Clause of that amendment does, however, deny to States the power to legislate that different treatment be accorded to persons placed by a statute into different classes on the basis of criteria wholly unrelated to the objective of that statute. A classification `must be reasonable, not arbitrary, and must rest upon some ground of difference having *84 a fair and substantial relation to the object of the legislation, so that all persons similarly circumstanced shall be treated alike.' Royster Guano Co. v. Virginia, 253 U.S. 412, 415, 40 S.Ct. 560, 64 L.Ed. 989 (1920)." 92 S.Ct. at 253, 254.
A.R.S. § 13-1580 creates two classes of accused persons and treats them differently. Thus the question is whether different treatment of those on bail or their own recognizance as opposed to those remaining in jail bears a rational relationship to the objectives apparently sought to be advanced by the operation of A.R.S. § 13-1580.
This statute was not adopted from any other jurisdiction, and we know of no other jurisdiction with a similar one. Although there is no legislative history to shed light on the legislative intent, and we have not had the benefit of appellate argument thereon, it is evident that A.R.S. § 13-1580 has a two-fold objective: (1) deterrence of criminal activity on the part of individuals who have been released on bail or on their own recognizance, and (2) enhancement of punishment of those who engage in criminal activity while so released. These objectives are clearly rational and reasonable. However, the operation of this statute transcends those objectives.
When the legislature enacted A.R.S. § 13-1580, it created a separate criminal offense  the offense of committing a felony while released on bail or own recognizance. By statute, a class of individuals who have exercised their state constitutional right to bail has been singled out. As to these individuals, the legislature has declared it to be a crime to be convicted of a crime. On the other hand, had they failed to exercise their constitutional right and remained in jail, there can be no such crime.
A simple illustration will demonstrate how this statute operates. For example, A and B are both arrested and charged with burglary. A is released on bail and B remains in jail. While released, A commits aggravated battery on a police officer. While in jail, B also commits aggravated battery on a police officer. Pursuant to a plea bargain, the original burglary charges against both A and B are dropped in exchange for a plea of guilty to the battery charges. Notwithstanding the fact that A and B have committed identical crimes, A may be convicted of two crimes  (1) aggravated battery and (2) committing a felony while released on bail or own recognizance. However, B can only be convicted of aggravated battery because his crime was committed in jail. Taken one step further, assume that A had been mistakenly accused and was totally innocent of the burglary charge. Under A.R.S. § 13-1580 he may still be convicted of two criminal offenses for the single battery solely because the act was committed while on bail. We fail to see any rational relationship between the objectives of A.R.S. § 13-1580 and its operation.
The Supreme Court of California in the case of In re King, 3 Cal.3d 226, 90 Cal. Rptr. 15, 474 P.2d 983 (1970), held unconstitutional a California statute which prescribed varying penalties between two categories of non-supporting fathers  (1) those who remain out of state for 30 days and (2) those who do not. Under the statute, any father who remained out of the State of California for 30 days while not supporting his child was guilty of a felony and a father who committed the identical act of criminal nonfeasance, but happened to be within California, was guilty only of a misdemeanor. The court found this provision a denial of equal protection of the laws because it created additional criminal liability on an individual solely because he chose to remain outside the state. The court pointed out that:
"`If a law has "no other purpose * * * than to chill the assertion of constitutional rights by penalizing those who choose to exercise them, then it [is] patently unconstitutional." United States v. Jackson, 390 U.S. 570, 581, 88 S.Ct. 1209, 1216, 20 L.Ed.2d 138 (1968).'" 90 Cal. Rptr. at 21, 22, 474 P.2d at 989.
*85 Similarly, in Spillers v. State, 84 Nev. 23, 436 P.2d 18 (1968), the Supreme Court of Nevada held unconstitutional a statute which provided that a person convicted of rape could not be sentenced to death if the case were tried to the court, but death could be imposed if affixed by a jury verdict. The court stated:
"A state may not prescribe different penalties for the same offense without violating the equal protection concept. Thus the statute is unconstitutional insofar as it allows a jury to impose a greater penalty than a court for the same offense, thus violating the Sixth and Fourteenth Amendments to the federal constitution, and art. 1, § 3 of our state constitution." 436 P.2d at 23.
Although King and Spillers were not concerned with a state constitutional right to bail, they denounced exactly that which our statute attempts  (1) the prescribing of different penalties for the same offense and (2) penalizing one for exercising a constitutional right. A.R.S. § 13-1580 not only prescribes different penalties for the same offense, but also creates an additional crime for the same offense, which crime can only be committed after one has exercised his constitutional right to bail.
As noted earlier, the sole purpose of bail is to secure the attendance of a defendant at trial. Making it an offense to be convicted of a felony which was committed while on bail neither helps secure the attendance of a defendant at trial nor insures compliance with the legal processes of this State. It serves no other purpose than to make bail an instrument of oppression which our Supreme Court has denounced. Gusick, supra. Our legislature has effectively chilled the assertion of the constitutional right to bail by penalizing those who have chosen to exercise it.
Regardless of the character of the crime, an accused on bail is clothed with the presumption of innocence. Gusick, supra. By singling out those admitted to bail, A.R.S. § 13-1580 strips the innocent of that presumption. One accused of a crime is not ipso facto a menace to society as A.R.S. § 13-1580 seems to presume. Such a presumption erodes the very foundation of our system of criminal justice, namely, the presumption of innocence.
If one is in fact a menace to society, adequate protective devices already exist. Art. 2 § 22 A.R.S. of our Constitution is itself designed to protect society from the dangerous. Paragraph 2 of that section denies bail, under designated circumstances, to a person who commits a felony while admitted to bail. A court may in its discretion set a higher bail for a defendant having recidivist tendencies. Release from custody is conditioned on good behavior while so released, A.R.S. § 13-1577, subd. D, and upon a breach of such condition, bail may be revoked. A.R.S. § 13-1578; Rendel, supra.
To achieve the objectives of A.R.S. § 13-1580, there is a reasonable way available with a lesser burden on the constitutionally protected right to bail. As was done in the District of Columbia[2] the legislature could enact a law enhancing the punishment of those who commit a felony while released on bail or own recognizance. *86 Unlike our statute, in the District of Columbia it is not a crime to commit a crime while released on bail.
Although we need not decide the question of inverse discrimination, it should be noted that in Williams v. Illinois, 399 U.S. 235, 90 S.Ct. 2018, 26 L.Ed.2d 586 (1970), it was recognized that if a wrongdoer were insulated from punishment because of indigency, equal protection would be denied the offender who is punished. The Supreme Court stated:
"The State is not powerless to enforce judgments against those financially unable to pay a fine; indeed, a different result would amount to inverse discrimination since it would enable an indigent to avoid both the fine and imprisonment for nonpayment whereas other defendants must always suffer one or the other conviction." 90 S.Ct. at 2024.
Under A.R.S. § 13-1580, one on bail or own recognizance is punished twice for one act, whereas the person who cannot afford bail is insulated from such double punishment even though he committed the identical act. The indigent who cannot afford bail is subject to a single charge.
We agree that the legislative objective in enacting A.R.S. § 13-1580 is commendable, but it is unfortunate that, as written, it cannot withstand constitutional scrutiny. We therefore hold that A.R.S. § 13-1580 is unconstitutional and appellant's conviction on Count II cannot stand. The judgment of conviction and sentence imposed thereon are ordered vacated.
HATHAWAY, C.J., and HOWARD, J., concur.
NOTES
[1]  This case is decided on the law as it existed prior to September 1, 1973.
[2]  D.C. Code Ann., § 23-1328 (1971), provides:

"Penalties for offenses committed during release
(a) Any person convicted of an offense committed while released pursuant to section 23-1321 shall be subject to the following penalties in addition to any other applicable penalties:
(1) A term of imprisonment of not less than one year and not more than five years if convicted of committing a felony while so released; and
(2) A term of imprisonment of not less than ninety days and not more than one year if convicted of committing a misdemeanor while so released.
(b) The giving of a warning to the person when released of the penalties imposed by this section shall not be a prerequisite to the application of this section.
(c) Any term of imprisonment imposed pursuant to this section shall be consecutive to any other sentence of imprisonment."
